Package com.foxinmy.weixin4j.http.entity
Class ByteArrayEntity
- java.lang.Object
-
- com.foxinmy.weixin4j.http.entity.ByteArrayEntity
-
- All Implemented Interfaces:
HttpEntity
public class ByteArrayEntity extends Object implements HttpEntity
-
-
Constructor Summary
Constructors Constructor Description ByteArrayEntity(byte[] content)
ByteArrayEntity(byte[] content, int off, int len, ContentType contentType)
ByteArrayEntity(byte[] content, ContentType contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getContent()
long
getContentLength()
ContentType
getContentType()
void
writeTo(OutputStream outstream)
-
-
-
Constructor Detail
-
ByteArrayEntity
public ByteArrayEntity(byte[] content)
-
ByteArrayEntity
public ByteArrayEntity(byte[] content, ContentType contentType)
-
ByteArrayEntity
public ByteArrayEntity(byte[] content, int off, int len, ContentType contentType)
-
-
Method Detail
-
getContentType
public ContentType getContentType()
- Specified by:
getContentType
in interfaceHttpEntity
-
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interfaceHttpEntity
-
getContent
public InputStream getContent() throws IOException
- Specified by:
getContent
in interfaceHttpEntity
- Throws:
IOException
-
writeTo
public void writeTo(OutputStream outstream) throws IOException
- Specified by:
writeTo
in interfaceHttpEntity
- Throws:
IOException
-
-