|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xmlmind.fo.converter.OutputDestination
public class OutputDestination
A conversion output destination.
This class is used to specify a destination for the conversion output. It encapsulates all destination types in a single object, which may include a byte stream, a character stream or a file name. When a byte stream or a file name is specified, an optional character encoding may be specified as well.
If a character stream is supplied, conversion output will be directed to that stream. Else if a byte stream is supplied the converter will use that stream, using the specified encoding if any. Else if a file name is supplied the converter will write to that file, using the specified encoding if any. If neither a stream or file name is supplied, the converter will use Standard Output as a byte stream.
| Constructor Summary | |
|---|---|
OutputDestination()
No-argument default constructor. |
|
OutputDestination(OutputStream byteStream)
Creates an output destination with a byte stream. |
|
OutputDestination(String fileName)
Creates an output destination with a file name. |
|
OutputDestination(Writer characterStream)
Creates an output destination with a character stream. |
|
| Method Summary | |
|---|---|
OutputDestination |
copy()
Returns a copy of this output destination. |
OutputStream |
getByteStream()
Gets the byte stream of this output destination. |
Writer |
getCharacterStream()
Gets the character stream of this output destination. |
String |
getEncoding()
Gets the encoding of this output destination. |
String |
getFileName()
Gets the file name of this output destination. |
void |
setByteStream(OutputStream byteStream)
Sets the byte stream of this output destination. |
void |
setCharacterStream(Writer characterStream)
Sets the character stream of this output destination. |
void |
setEncoding(String encoding)
Sets the encoding of this output destination. |
void |
setFileName(String fileName)
Sets the file name of this output destination. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OutputDestination()
public OutputDestination(String fileName)
Applications may use the setEncoding
method to specify a character encoding.
fileName - the file namesetEncodingpublic OutputDestination(OutputStream byteStream)
Applications may use the setEncoding
method to specify a character encoding.
byteStream - the byte streamsetEncodingpublic OutputDestination(Writer characterStream)
characterStream - the character stream| Method Detail |
|---|
public String getFileName()
null if none was supplied.setFileNamepublic String getEncoding()
null if none was supplied.setEncodingpublic OutputStream getByteStream()
null if none was supplied.setByteStreampublic Writer getCharacterStream()
null if none was
supplied.setCharacterStreampublic void setFileName(String fileName)
fileName - the file namegetFileNamepublic void setEncoding(String encoding)
encoding - the encodinggetEncodingpublic void setByteStream(OutputStream byteStream)
byteStream - the byte streamgetByteStreampublic void setCharacterStream(Writer characterStream)
characterStream - the character streamgetCharacterStreampublic OutputDestination copy()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||