|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataSink
Output document data sink.
Actually, the DataSink can be seen as a factory for creating OutputStreams with mime type and character encoding provided. This allows the API user to decide how data is to be stored (e.g. in a file, in a byte array, etc.).
| Method Summary | |
|---|---|
OutputStream |
createOutputStream(String mimeType)
Creates an OutputStream for binary data. |
OutputStream |
createOutputStream(String mimeType,
String characterEncoding)
Creates an OutputStream for character data. |
String |
getCharacterEncoding()
Returns the character encoding of the data stream. |
String |
getMimeType()
Returns the mime type of the data stream. |
| Method Detail |
|---|
OutputStream createOutputStream(String mimeType)
throws IOException
Note that the stream may be written only once. Creating another stream overwrites the existing one.
mimeType - The mime type of the output data.
IOException - Thrown if the stream cannot be created.
OutputStream createOutputStream(String mimeType,
String characterEncoding)
throws IOException
This is basically the same as createOutputStream(String), but
allows to specify the character encoding.
mimeType - The mime type of the output data.characterEncoding - The character encoding of the data.
IOException - Thrown if the stream cannot be created.String getMimeType()
This is only valid after a stream has been created.
String getCharacterEncoding()
This is only valid after a stream has been created. Null means that no character encoding was specified for the data (e.g. if the data is binary).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||