| Modifier and Type | Field and Description |
|---|---|
| private byte[] | buf
Internal buffer to collect the characters to go to the trace listener. |
| private int | buf_length
The size of the internal buffer, just to keep too many events from being sent to the tracer |
| private int | count
How many bytes have been collected and still need to go to trace listener. |
| private final SerializerTrace | m_tracer
The tracer to send events to |
| private final Writer | m_writer
The real writer to immediately write to. |
| Access | Constructor and Description |
|---|---|
| public | SerializerTraceWriter(Writer
the Writer to write to (possibly null) out, SerializerTrace the tracer to inform that characters are being written tracer)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract java. Implements com. Flush the internal buffer and close the Writer |
| public void | flush()
Implements abstract java. Implements com. Flush the internal buffer and flush the Writer |
| private void | |
| public OutputStream | getOutputStream()
Implements com. Get the OutputStream that is the at the end of the chain of writers. |
| public Writer | getWriter()
Implements com. Get the writer that this one directly wraps. |
| private void | setBufferSize(int size)
Creates or replaces the internal buffer, and makes sure it has a few extra bytes slight overflow of the last UTF8 encoded character. |
| public void | write(final int
int specifying a character to be written. c)Overrides java. Implements com. Write a single character. |
| public void | write(final char[]
Array of characters chars, final int Offset from which to start writing characters start, final int Number of characters to write length)Implements abstract java. Implements com. Write a portion of an array of characters. |
| public void | write(final String
String to be written s)Overrides java. Implements com. Write a string. |
| buf | back to summary |
|---|---|
| private byte[] buf Internal buffer to collect the characters to go to the trace listener. | |
| buf_length | back to summary |
|---|---|
| private int buf_length The size of the internal buffer, just to keep too many events from being sent to the tracer | |
| count | back to summary |
|---|---|
| private int count How many bytes have been collected and still need to go to trace listener. | |
| m_tracer | back to summary |
|---|---|
| private final SerializerTrace m_tracer The tracer to send events to | |
| m_writer | back to summary |
|---|---|
| private final Writer m_writer The real writer to immediately write to. This reference may be null, in which case nothing is written out, but only the trace events are fired for output. | |
| SerializerTraceWriter | back to summary |
|---|---|
| public SerializerTraceWriter(Writer out, SerializerTrace tracer) Constructor. If the writer passed in is null, then this SerializerTraceWriter will only signal trace events of what would have been written to that writer. If the writer passed in is not null then the trace events will mirror what is going to that writer. In this way tools, such as a debugger, can gather information on what is being written out.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements com. Flush the internal buffer and close the Writer
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements abstract java. Implements com. Flush the internal buffer and flush the Writer
| |
| flushBuffer | back to summary |
|---|---|
| private void flushBuffer() throws IOException Flush out the collected characters by sending them to the trace listener. These characters are never written to the real writer (m_writer) because that has already happened with every method call. This method simple informs the listener of what has already happened. | |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() Implements com. Get the OutputStream that is the at the end of the chain of writers. | |
| getWriter | back to summary |
|---|---|
| public Writer getWriter() Implements com. Get the writer that this one directly wraps. | |
| setBufferSize | back to summary |
|---|---|
| private void setBufferSize(int size) Creates or replaces the internal buffer, and makes sure it has a few extra bytes slight overflow of the last UTF8 encoded character. | |
| write | back to summary |
|---|---|
| public void write(final int c) throws IOException Overrides java. Implements com. Write a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored. Subclasses that intend to support efficient single-character output should override this method.
| |
| write | back to summary |
|---|---|
| public void write(final char[] chars, final int start, final int length) throws IOException Implements abstract java. Implements com. Write a portion of an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(final String s) throws IOException Overrides java. Implements com. Write a string.
| |