DEFAULT_CHARACTER_SET_ENCODING| Constructor and Description |
|---|
StringSource(String str) |
StringSource(String str, String contentType) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes(int len) |
String |
getCharset() |
String |
getContentType() |
InputStream |
getInputStream(TransformOptions options)
Returns streaming byte-baseed representation of the Source's content.
|
static StringSource |
getInstance(InputStream in, TransformOptions options) |
int |
getSize() |
String |
getString() |
String |
toString() |
void |
writeTo(OutputStream os, TransformOptions options)
Serializes the Source's content to a byte-based stream.
|
public StringSource(String str)
public String getContentType()
public String getString()
public InputStream getInputStream(TransformOptions options) throws IOException, TransformException
SourcegetInputStream in interface Sourceoptions - Options used to affect the serializationIOExceptionTransformExceptionpublic void writeTo(OutputStream os, TransformOptions options) throws IOException, TransformException
SourceNote that this method may involve an internal transformation, although it should not in any way change the underlying content.
writeTo in interface Sourceos - the OutputStream to which serialized content will be writtenoptions - TransformOptions used to affect the serializationIOExceptionTransformExceptionpublic static StringSource getInstance(InputStream in, TransformOptions options) throws IOException
IOExceptionpublic byte[] getBytes(int len)
public int getSize()
public String getCharset()