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.FileBody
This is a file body that notifies about the progess a given listener
- Since:
- 7.5
- Author:
- Marco Meschieri - LogicalDOC
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionFileBodyCounter
(File file, FileBodyCounter.ProgressListener listener) FileBodyCounter
(File file, org.apache.http.entity.ContentType contentType, String filename, FileBodyCounter.ProgressListener listener) -
Method Summary
Methods inherited from class org.apache.http.entity.mime.content.FileBody
getContentLength, getFile, getFilename, getInputStream, getTransferEncoding
Methods inherited from class org.apache.http.entity.mime.content.AbstractContentBody
getCharset, getContentType, getMediaType, getMimeType, getSubType
-
Constructor Details
-
FileBodyCounter
public FileBodyCounter(File file, org.apache.http.entity.ContentType contentType, String filename, FileBodyCounter.ProgressListener listener) -
FileBodyCounter
-
-
Method Details
-
getBytesWritten
public long getBytesWritten() -
writeTo
- Specified by:
writeTo
in interfaceorg.apache.http.entity.mime.content.ContentBody
- Overrides:
writeTo
in classorg.apache.http.entity.mime.content.FileBody
- Throws:
IOException
-