DEFAULT_CHARACTER_SET_ENCODING| Constructor and Description |
|---|
StringSource(java.lang.String str) |
StringSource(java.lang.String str, java.lang.String contentType) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes(int len) |
java.lang.String |
getCharset() |
java.lang.String |
getContentType() |
java.io.InputStream |
getInputStream(TransformOptions options)
Returns streaming byte-baseed representation of the Source's content.
|
static StringSource |
getInstance(java.io.InputStream in, TransformOptions options) |
int |
getSize() |
java.lang.String |
getString() |
java.lang.String |
toString() |
void |
writeTo(java.io.OutputStream os, TransformOptions options)
Serializes the Source's content to a byte-based stream.
|
public StringSource(java.lang.String str)
public StringSource(java.lang.String str,
java.lang.String contentType)
public java.lang.String getContentType()
public java.lang.String getString()
public java.io.InputStream getInputStream(TransformOptions options) throws java.io.IOException, TransformException
SourcegetInputStream in interface Sourceoptions - Options used to affect the serializationjava.io.IOExceptionTransformException
public void writeTo(java.io.OutputStream os,
TransformOptions options)
throws java.io.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 serializationjava.io.IOExceptionTransformExceptionpublic static StringSource getInstance(java.io.InputStream in, TransformOptions options) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic byte[] getBytes(int len)
public int getSize()
public java.lang.String getCharset()