|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.enterprisedt.util.debug.StreamAppender
com.enterprisedt.util.debug.MemoryAppender
public class MemoryAppender
Appends log statements to an in-memory buffer.
| Field Summary | |
|---|---|
static int |
DEFAULT_BUFFER_SIZE
Default size of memory-buffer (100k). |
| Fields inherited from class com.enterprisedt.util.debug.StreamAppender |
|---|
log, outStr |
| Fields inherited from interface com.enterprisedt.util.debug.Appender |
|---|
cvsId |
| Constructor Summary | |
|---|---|
MemoryAppender()
Create a MemoryAppender whose buffer is initially set to 100k. |
|
MemoryAppender(int initSize)
Create a MemoryAppender whose buffer has the given initial size. |
|
| Method Summary | |
|---|---|
byte[] |
getBuffer()
Returns the current buffer. |
java.io.Reader |
getReader()
Returns a reader that may be used to access the current buffer. |
void |
print()
Writes the entire buffer to stdout. |
void |
print(java.io.PrintStream stream)
Writes the entire buffer to the given writer. |
java.lang.String |
toString()
|
| Methods inherited from class com.enterprisedt.util.debug.StreamAppender |
|---|
close, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_BUFFER_SIZE
| Constructor Detail |
|---|
public MemoryAppender(int initSize)
size - Initial size of buffer.public MemoryAppender()
| Method Detail |
|---|
public byte[] getBuffer()
public java.io.Reader getReader()
public java.lang.String toString()
toString in class java.lang.Objectpublic void print(java.io.PrintStream stream)
writer - Writer to write to.public void print()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||