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
Nested Classes Modifier and Type Class Description static interface
FileBodyCounter.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 long
getBytesWritten()
void
writeTo(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:
writeTo
in interfaceorg.apache.http.entity.mime.content.ContentBody
- Overrides:
writeTo
in classorg.apache.http.entity.mime.content.FileBody
- Throws:
IOException
-
-