processLine whenever a full line has
been written to this stream.
Tries to be smart about line separators.
| Modifier and Type | Field and Description |
|---|---|
| private ByteArrayOutputStream | |
| private static final int | CR
Carriage return |
| private static final int | INITIAL_SIZE
Initial buffer size. |
| private static final int | LF
Linefeed |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| public void | flush()
Overrides java. Implements java. |
| protected void | |
| protected abstract void | |
| protected void | |
| public final void | write(int
data to log (byte). cc)Implements abstract java. |
| public final void | write(byte[]
the array containing the data b, int the offset into the array where data starts off, int the length of block len)Overrides java. |
| buffer | back to summary |
|---|---|
| private ByteArrayOutputStream buffer | |
| CR | back to summary |
|---|---|
| private static final int CR Carriage return | |
| INITIAL_SIZE | back to summary |
|---|---|
| private static final int INITIAL_SIZE Initial buffer size. | |
| LF | back to summary |
|---|---|
| private static final int LF Linefeed | |
| skip | back to summary |
|---|---|
| private boolean skip | |
| LineOrientedOutputStream | back to summary |
|---|---|
| public LineOrientedOutputStream() | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Writes all remaining
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Flush this log stream
| |
| processBuffer | back to summary |
|---|---|
| protected void processBuffer() throws IOException Converts the buffer to a byte[] and sends it to
| |
| processLine | back to summary |
|---|---|
| protected abstract void processLine(String line) throws IOException Processes a line.
| |
| processLine | back to summary |
|---|---|
| protected void processLine(byte[] line) throws IOException Processes a line. This implementations invokes the string-arg version converting the byte array using the default encoding. Subclasses are encouraged to override this method (and provide a dummy implementation of the String-arg version) so they don't interfere with the encoding of the underlying stream.
| |
| write | back to summary |
|---|---|
| public final void write(int cc) throws IOException Implements abstract java. Write the data to the buffer and flush the buffer, if a line separator is detected.
| |
| write | back to summary |
|---|---|
| public final void write(byte[] b, int off, int len) throws IOException Overrides java. Write a block of characters to the output stream
| |