|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--java.io.FilterOutputStream | +--examples.awt.AwtOutputStream
A class which acts as an output stream and pushes anything it is passed into a java TextArea object.
The text area widget is passed by the caller of the constructor.
Lines longer than a set length are truncated.
When the maximum allowable amount of data has been collected , and put into the TextArea widget, then 66% of it is removed. In this manner, space is created for more recent trace information while retaining 33% of the recent history.
A filter string can be set into this object which will suppress output to the text area if the filter string does not exist in each line of output.
Field Summary | |
static short[] |
version
|
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary | |
AwtOutputStream(java.awt.TextArea textArea)
Constructor. |
|
AwtOutputStream(java.awt.TextArea textArea,
int maxLineLength,
int maxHistoryChars)
Constructor. |
Method Summary | |
void |
clear()
From the MQeClearable interface. |
protected void |
dataOutput(java.lang.String data)
Update the TextArea with the new message. |
java.lang.String |
filter(java.lang.String filter)
Apply a filter to the output display (not applied to logfile). |
protected void |
finalize()
Clean up before this object is garbage-collected. |
void |
flush()
Required by the output stream interface. |
protected void |
format(java.lang.String data,
int tabSize)
Tormat tab, cr and lf characters if they are present. |
protected void |
output(java.lang.String data)
Output the message data to display and/or to log (Filter permitting). |
static java.lang.String |
replace(java.lang.String source,
java.lang.String what,
java.lang.String with)
Replace one substring with another in a string. |
void |
saveAs(java.lang.String thisFile)
Save the current Text area contents. |
void |
write(byte[] data)
Write byte array. |
void |
write(byte[] data,
int offset,
int len)
Write byte array. |
void |
write(int Data)
Write character. |
Methods inherited from class java.io.FilterOutputStream |
close |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static short[] version
Constructor Detail |
public AwtOutputStream(java.awt.TextArea textArea)
textArea
- TextArea to which output passed to this output stream will
be sent. Should not be null.public AwtOutputStream(java.awt.TextArea textArea, int maxLineLength, int maxHistoryChars)
textArea
- TextArea to which output passed to this output stream will
be sent. Should not be null.maxLineLength
- The max number of characters which are allowed per line of text.
Lines longer than this are truncated to this length.maxHistoryChars
- The max number of characters which are held by the text area
output stream. when full, 1/3rd of the data is thrown away, oldest data first.Method Detail |
protected void dataOutput(java.lang.String data)
data
- java.lang.String
public void clear()
clear
in interface MQeClearable
public java.lang.String filter(java.lang.String filter)
filter
- java.lang.String
protected void finalize()
finalize
in class java.lang.Object
public void flush()
flush
in class java.io.FilterOutputStream
protected void format(java.lang.String data, int tabSize)
data
- The text to output.tabSize
- The number of spaces a tab should be substituted for.public static java.lang.String replace(java.lang.String source, java.lang.String what, java.lang.String with)
source
- String in which the sustring is to be replaced.what
- String that needs to be replacedwith
- String to replace with
public void saveAs(java.lang.String thisFile) throws java.lang.Exception
thisFile
- file name.
java.lang.Exception
protected void output(java.lang.String data)
data
- java.lang.String
public void write(byte[] data, int offset, int len)
write
in class java.io.FilterOutputStream
data
- Data to be written in to the byte Arrayoffset
- Offset from where the write should happenlen
- The total number of bytes to be written
public void write(byte[] data)
write
in class java.io.FilterOutputStream
data
- Data to be written in to the byte Array
public void write(int Data)
write
in class java.io.FilterOutputStream
Data
- an integer
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |