Package org.apache.http.client.fluent
Class Content
- java.lang.Object
-
- org.apache.http.client.fluent.Content
-
public class Content extends Object
This class represents arbitrary content of a specific type that can be consumed multiple times and requires no explicit deallocation.
-
-
Field Summary
Fields Modifier and Type Field Description static Content
NO_CONTENT
-
Constructor Summary
Constructors Constructor Description Content(byte[] raw, ContentType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
asBytes()
InputStream
asStream()
String
asString()
String
asString(Charset charset)
ContentType
getType()
String
toString()
-
-
-
Field Detail
-
NO_CONTENT
public static final Content NO_CONTENT
-
-
Constructor Detail
-
Content
public Content(byte[] raw, ContentType type)
-
-
Method Detail
-
getType
public ContentType getType()
-
asBytes
public byte[] asBytes()
-
asString
public String asString()
-
asStream
public InputStream asStream()
-
-