Package com.foxinmy.weixin4j.http.entity
Class StringEntity
- java.lang.Object
-
- com.foxinmy.weixin4j.http.entity.StringEntity
-
- All Implemented Interfaces:
HttpEntity
- Direct Known Subclasses:
FormUrlEntity
public class StringEntity extends Object implements HttpEntity
-
-
Constructor Summary
Constructors Constructor Description StringEntity(String body)
StringEntity(String body, ContentType contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getContent()
long
getContentLength()
String
getContentString()
ContentType
getContentType()
void
writeTo(OutputStream outstream)
-
-
-
Constructor Detail
-
StringEntity
public StringEntity(String body)
-
StringEntity
public StringEntity(String body, 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
-
getContentString
public String getContentString()
-
-