gumbo.net.msg
Class MessageMonitorWriter
java.lang.Object
|
+--java.io.Writer
|
+--gumbo.net.msg.MessageMonitorWriter
- public class MessageMonitorWriter
- extends java.io.Writer
Writer filter that translates an ASCII message stream into a more readable
form for monitoring message traffic.
- Version:
- $Revision: 1.6 $
- Author:
- Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.
Fields inherited from class java.io.Writer |
lock |
Method Summary |
void |
close()
|
void |
flush()
|
static java.lang.String |
toMonitorString(char[] cbuf,
int off,
int len)
Utility that filters a character string from a message stream to make
special message characters readable (e.g. |
void |
write(char[] cbuf,
int off,
int len)
|
Methods inherited from class java.io.Writer |
write, write, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageMonitorWriter
public MessageMonitorWriter(java.io.Writer targetWriter)
write
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Specified by:
write
in class java.io.Writer
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in class java.io.Writer
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in class java.io.Writer
java.io.IOException
toMonitorString
public static java.lang.String toMonitorString(char[] cbuf,
int off,
int len)
- Utility that filters a character string from a message stream to make
special message characters readable (e.g. end-of-message character becomes
"\n").
- Parameters:
cbuf
- Input character buffer.off
- Offset into start of cbuf data.len
- Length data in cbuf.
- Returns:
- New String with the filtered data.