Package com.foxinmy.weixin4j.http.entity
Class FileEntity
- java.lang.Object
-
- com.foxinmy.weixin4j.http.entity.FileEntity
-
- All Implemented Interfaces:
HttpEntity
public class FileEntity extends Object implements HttpEntity
-
-
Constructor Summary
Constructors Constructor Description FileEntity(File file)FileEntity(File file, ContentType contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamgetContent()longgetContentLength()ContentTypegetContentType()voidwriteTo(OutputStream outstream)
-
-
-
Constructor Detail
-
FileEntity
public FileEntity(File file)
-
FileEntity
public FileEntity(File file, ContentType contentType)
-
-
Method Detail
-
getContentType
public ContentType getContentType()
- Specified by:
getContentTypein interfaceHttpEntity
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceHttpEntity
-
getContent
public InputStream getContent() throws IOException
- Specified by:
getContentin interfaceHttpEntity- Throws:
IOException
-
writeTo
public void writeTo(OutputStream outstream) throws IOException
- Specified by:
writeToin interfaceHttpEntity- Throws:
IOException
-
-