|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--org.shlublu.javax.awt.TextComponentOutputStream
Creation : 4 sept 2001 OutputStream which writes into standard awt TextComponent. The output method (append() vs setText()) is choosen depending of the given component. A maximal component's text capacity can be defined. When reached its capacity, the component will erase the beginning of its content.
OutputStream
Field Summary | |
protected java.lang.StringBuffer |
buffer
Internal buffer |
protected java.awt.TextComponent |
component
The component to write into |
Constructor Summary | |
TextComponentOutputStream(java.awt.TextComponent componentGiven)
Constructor |
|
TextComponentOutputStream(java.awt.TextComponent componentGiven,
int iMaxLinesGiven,
int iStepGiven)
Constructor |
Method Summary | |
void |
close()
Close the stream, so it can't be used anymore. |
void |
flush()
write the content to the component, flushing the internal buffer |
void |
write(byte[] aby)
write from a byte array, according to the java.io.InputStream specification |
void |
write(byte[] aby,
int iStart,
int iLen)
write from a byte array, according to the java.io.InputStream specification |
void |
write(int iByte)
write a char, according to the java.io.OutputStream specifications |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.awt.TextComponent component
protected java.lang.StringBuffer buffer
Constructor Detail |
public TextComponentOutputStream(java.awt.TextComponent componentGiven)
TextComponent
- The component to write intopublic TextComponentOutputStream(java.awt.TextComponent componentGiven, int iMaxLinesGiven, int iStepGiven)
TextComponent
- The component to write intoint
- iMaxLinesGiven The maximal text quantity (lines)int
- iStepGiven The number of lines to erase when capacity is reachedjava.lang.IllegalArgumentException
- When iMaxLinesGiven < 0 || iStepGiven > iMaxLinesGivenMethod Detail |
public void write(int iByte) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
- as java.lang.OutputStream definespublic void write(byte[] aby) throws java.io.IOException
write
in class java.io.OutputStream
byte
- [] the arrayjava.io.IOException
- as java.lang.OutputStream defineNullPointerException
- if the given array is nullpublic void write(byte[] aby, int iStart, int iLen) throws java.io.IOException
write
in class java.io.OutputStream
byte
- [] the arrayint
- iStart the index to begin atint
- iLen the length to writejava.io.IOException
- as java.lang.OutputStream defineNullPointerException
- if the given array is nulljava.lang.IndexOutOfBoundsException
- if the indexes or length are wrongpublic void flush() throws java.io.IOException
flush
in class java.io.OutputStream
java.io.IOException
- as java.lang.OutputStream definepublic void close() throws java.io.IOException
close
in class java.io.OutputStream
java.io.IOException
- as java.lang.OutputStream define
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |