|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
javolution.xml.XmlOutputStream<T>
public class XmlOutputStream<T>
This class represents an object output stream using ObjectWriter
for object serialization.
Instances of this class embed their own data buffer, wrapping using a
java.io.BufferedOutputStream is therefore unnescessary.
XmlInputStream| Constructor Summary | |
|---|---|
XmlOutputStream()
Default constructor. |
|
XmlOutputStream(ObjectWriter<T> writer)
Creates a xml output stream using the specified object writer. |
|
| Method Summary | |
|---|---|
void |
close()
Closes and resets this stream for reuse. |
void |
flush()
Flushes this output stream and forces any buffered output bytes to be written out. |
void |
reset()
Resets the internal state of this object to its default values. |
XmlOutputStream |
setOutputStream(java.io.OutputStream out)
Sets the underlying output destination for this stream. |
void |
write(byte[] b,
int off,
int len)
Writes the specified number of bytes from the specified byte array starting at the specified offset to this output stream. |
void |
write(int b)
Writes the specified byte to this output stream |
void |
writeObject(T obj)
Writes an object to the underlying stream using an ObjectWriter. |
| Methods inherited from class java.io.OutputStream |
|---|
write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlOutputStream()
public XmlOutputStream(ObjectWriter<T> writer)
writer - the object writer.| Method Detail |
|---|
public XmlOutputStream setOutputStream(java.io.OutputStream out)
out - the output destination.
this
java.lang.IllegalStateException - if this stream is being reused and
it has not been closed or reset.
public void writeObject(T obj)
throws java.io.IOException
ObjectWriter.
obj - the object writen using its xml representation.
java.io.IOException - if an I/O error occurs.
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - the byte.
java.io.IOException - if an I/O error occurs.
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.
java.io.IOException - if an I/O error occurs.
public void close()
throws java.io.IOException
resets this stream for reuse.
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.public void reset()
Reusable
reset in interface Reusable
|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||