|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream org.freehep.util.DocumentOutputStream
An OutputStream implementation that places it's output in a swing text model (Document). The Document can be either a plain text or styled document implementation. If styled, the attributes assigned to the output stream will be used in the display of the output.
Constructor Summary | |
DocumentOutputStream(Document doc)
Constructs an output stream that will output to the given document with whatever the default attributes are. |
|
DocumentOutputStream(Document doc,
AttributeSet a)
Constructs an output stream that will output to the given document with the given set of character attributes. |
Method Summary | |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array
starting at offset off to this output stream.
|
void |
write(int b)
Writes the specified byte to this output stream. |
Methods inherited from class java.io.OutputStream |
close, flush, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DocumentOutputStream(Document doc, AttributeSet a)
doc
- the document to write to.a
- the character attributes to use for the written
text.public DocumentOutputStream(Document doc)
doc
- the document to write to.Method Detail |
public void write(int b) throws IOException
Subclasses of OutputStream
must provide an
implementation for this method.
b
- the byte
.
IOException
- if an I/O error occurs.public void write(byte[] b, int off, int len) throws IOException
len
bytes from the specified byte array
starting at offset off
to this output stream.
The write
method of OutputStream
calls
the write method of one argument on each of the bytes to be
written out. Subclasses are encouraged to override this method and
provide a more efficient implementation.
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.
IOException
- if an I/O error occurs.
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |