|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.tamino.db.api.objectModel.stream.TStreamWriter
public class TStreamWriter
TStreamWriter is capable to write byte or character input streams containing XML to byte or character output streams by making use of the SAX based event model. By doing this, it can always be ensured that well formed XML content is written to the specific character or byte output strea. It uses a SAX parser and internally acts as an event handler. By doing this it can be ensured that wellformed XML content is passed without I18N problems to the given sunk stream.
Constructor Summary | |
---|---|
TStreamWriter()
Default Constructor. |
|
TStreamWriter(java.io.InputStream inputStream)
Initializs the writer with the given byte input stream. |
|
TStreamWriter(java.io.InputStream inputStream,
int bufferSize)
Initializs the writer with the given byte input stream and buffer size. |
|
TStreamWriter(java.io.InputStream inputStream,
java.lang.String systemId)
Initializs the writer with the given byte input stream. |
|
TStreamWriter(java.io.InputStream inputStream,
java.lang.String systemId,
int bufferSize)
Initializs the writer with the given byte input stream and buffer size. |
|
TStreamWriter(java.io.Reader reader)
Initializs the writer with the given byte input stream. |
|
TStreamWriter(java.io.Reader reader,
int bufferSize)
Initializs the writer with the given character input stream and buffer size. |
|
TStreamWriter(java.io.Reader reader,
java.lang.String systemId)
Initializs the writer with the given byte input stream. |
|
TStreamWriter(java.io.Reader reader,
java.lang.String systemId,
int bufferSize)
Initializs the writer with the given character input stream and buffer size. |
Method Summary | |
---|---|
java.lang.String |
getDocname()
Gets the ino:docname from the underlying streams element. |
java.lang.String |
getId()
Gets the ino:id if one is available. |
org.xml.sax.InputSource |
getInputSource()
Gets the current input source. |
java.util.Locale |
getLocale()
Gets the locale. |
java.lang.String |
getStartTag()
Gets the name of the start tag. |
boolean |
hasWritableStream()
Indicates whether the writer currently contains a writable stream. |
void |
setDocname(java.lang.String docname)
Sets the ino:docname on the underlying streams element. |
void |
setId(java.lang.String id)
Sets the ino:id on the underlying streams element. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
void |
setWritableStream(java.io.InputStream inputStream)
Sets a new writable byte input stream on the writer. |
void |
setWritableStream(java.io.InputStream inputStream,
java.lang.String systemId)
Sets a new writable byte input stream on the writer. |
void |
setWritableStream(java.io.Reader reader)
Sets a new writable character input stream on the writer. |
void |
setWritableStream(java.io.Reader reader,
java.lang.String systemId)
Sets a new writable character input stream on the writer. |
void |
writeTo(java.io.OutputStream outputStream,
java.lang.String encoding)
Serializes the currently given underlying input stream to the given byte output stream. |
void |
writeTo(java.io.Writer writer,
java.lang.String encoding)
Serializes the currently given underlying input stream to the given character output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TStreamWriter() throws java.lang.Exception
java.lang.Exception
public TStreamWriter(java.io.InputStream inputStream, int bufferSize) throws java.lang.Exception
inputStream
- denotes the byte input stream which XML content should be written to a data sunkbufferSize
- indicates the range in which the entire content. If it is less or equal
0 the default size of 1MB is taken.
java.lang.Exception
public TStreamWriter(java.io.InputStream inputStream) throws java.lang.Exception
inputStream
- denotes the byte input stream which XML content should be written to a data sunk
java.lang.Exception
public TStreamWriter(java.io.Reader reader, int bufferSize) throws java.lang.Exception
reader
- denotes the character input stream which XML content should be written to a data sunkbufferSize
- indicates the range in which the entire start element resides. If it is less or equal
0 the default size of 1024 is taken.
java.lang.Exception
public TStreamWriter(java.io.Reader reader) throws java.lang.Exception
reader
- denotes the character input stream which XML content should be written to a data sunkinputStream
- denotes the byte input stream which XML content should be written to a data sunk
java.lang.Exception
public TStreamWriter(java.io.InputStream inputStream, java.lang.String systemId, int bufferSize) throws java.lang.Exception
inputStream
- denotes the byte input stream which XML content should be written to a data sunkbufferSize
- indicates the range in which the entire content. If it is less or equal
0 the default size of 1MB is taken.
java.lang.Exception
public TStreamWriter(java.io.InputStream inputStream, java.lang.String systemId) throws java.lang.Exception
inputStream
- denotes the byte input stream which XML content should be written to a data sunk
java.lang.Exception
public TStreamWriter(java.io.Reader reader, java.lang.String systemId, int bufferSize) throws java.lang.Exception
reader
- denotes the character input stream which XML content should be written to a data sunkbufferSize
- indicates the range in which the entire start element resides. If it is less or equal
0 the default size of 1024 is taken.
java.lang.Exception
public TStreamWriter(java.io.Reader reader, java.lang.String systemId) throws java.lang.Exception
reader
- denotes the character input stream which XML content should be written to a data sunkinputStream
- denotes the byte input stream which XML content should be written to a data sunk
java.lang.Exception
Method Detail |
---|
public void setDocname(java.lang.String docname)
docname
- is the ino:docname attribute of the data object.public void setId(java.lang.String id)
id
- denotes the ino:id that has to be set on the underlying element.public java.lang.String getDocname()
public java.lang.String getId()
public java.lang.String getStartTag()
public void setWritableStream(java.io.InputStream inputStream) throws java.lang.Exception
inputStream
- denotes the byte input stream that shall be written to an output stream.
java.lang.Exception
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
public void setWritableStream(java.io.InputStream inputStream, java.lang.String systemId) throws java.lang.Exception
inputStream
- denotes the byte input stream that shall be written to an output stream.systemId
- the base URI of the data to resolve relative references.
java.lang.Exception
public void setWritableStream(java.io.Reader reader) throws java.lang.Exception
inputStream
- denotes the character input stream that shall be written to an output stream.
java.lang.Exception
public void setWritableStream(java.io.Reader reader, java.lang.String systemId) throws java.lang.Exception
inputStream
- denotes the character input stream that shall be written to an output stream.systemId
- the base URI to resolve relative references.
java.lang.Exception
public void writeTo(java.io.Writer writer, java.lang.String encoding) throws TStreamWriteException
writer
- denotes the character output stream to which the underlying stream shall be written to.encoding
- the enconding string set in the XML declaration.
TStreamWriteException
public void writeTo(java.io.OutputStream outputStream, java.lang.String encoding) throws TStreamWriteException
writer
- denotes the byte output stream to which the underlying stream shall be written to.encoding
- the enconding string set in the XML declaration.
TStreamWriteException
public boolean hasWritableStream()
public org.xml.sax.InputSource getInputSource()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |