com.foxinmy.weixin4j.http.entity
Class ByteArrayEntity

java.lang.Object
  extended by com.foxinmy.weixin4j.http.entity.ByteArrayEntity
All Implemented Interfaces:
HttpEntity

public class ByteArrayEntity
extends Object
implements HttpEntity


Constructor Summary
ByteArrayEntity(byte[] content)
           
ByteArrayEntity(byte[] content, ContentType contentType)
           
ByteArrayEntity(byte[] content, int off, int len, ContentType contentType)
           
 
Method Summary
 InputStream getContent()
           
 long getContentLength()
           
 ContentType getContentType()
           
 void writeTo(OutputStream outstream)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface HttpEntity

getContentLength

public long getContentLength()
Specified by:
getContentLength in interface HttpEntity

getContent

public InputStream getContent()
                       throws IOException
Specified by:
getContent in interface HttpEntity
Throws:
IOException

writeTo

public void writeTo(OutputStream outstream)
             throws IOException
Specified by:
writeTo in interface HttpEntity
Throws:
IOException


Copyright © 2014–2017. All rights reserved.