Package com.logicaldoc.util.http
Class FileBodyCounter
- java.lang.Object
-
- org.apache.http.entity.mime.content.AbstractContentBody
-
- org.apache.http.entity.mime.content.FileBody
-
- com.logicaldoc.util.http.FileBodyCounter
-
- All Implemented Interfaces:
org.apache.http.entity.mime.content.ContentBody,org.apache.http.entity.mime.content.ContentDescriptor
public class FileBodyCounter extends org.apache.http.entity.mime.content.FileBodyThis is a file body that notifies about the progess a given listener- Since:
- 7.5
- Author:
- Marco Meschieri - LogicalDOC
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFileBodyCounter.ProgressListener
-
Constructor Summary
Constructors Constructor Description FileBodyCounter(File file, FileBodyCounter.ProgressListener listener)FileBodyCounter(File file, org.apache.http.entity.ContentType contentType, String filename, FileBodyCounter.ProgressListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBytesWritten()voidwriteTo(OutputStream out)-
Methods inherited from class org.apache.http.entity.mime.content.FileBody
getContentLength, getFile, getFilename, getInputStream, getTransferEncoding
-
-
-
-
Constructor Detail
-
FileBodyCounter
public FileBodyCounter(File file, org.apache.http.entity.ContentType contentType, String filename, FileBodyCounter.ProgressListener listener)
-
FileBodyCounter
public FileBodyCounter(File file, FileBodyCounter.ProgressListener listener)
-
-
Method Detail
-
getBytesWritten
public long getBytesWritten()
-
writeTo
public void writeTo(OutputStream out) throws IOException
- Specified by:
writeToin interfaceorg.apache.http.entity.mime.content.ContentBody- Overrides:
writeToin classorg.apache.http.entity.mime.content.FileBody- Throws:
IOException
-
-