public class WriterEncodedAppender extends AbstractEncodedAppender
| Constructor and Description |
|---|
WriterEncodedAppender(java.io.Writer target)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendCharSequence(EncodingState encodingState,
java.lang.CharSequence csq,
int start,
int end)
Append a portion of a CharSequence to the buffer and attach the
encodingState information to it
|
void |
close() |
protected EncodingState |
createNewEncodingState(Encoder encoder,
EncodingState encodingState) |
void |
flush()
Flush the internal buffer and write the buffered input to a possible
destination.
|
protected void |
write(EncodingState encodingState,
char[] b,
int off,
int len)
Append a portion of a char array to the buffer and attach the
encodingState information to it
|
protected void |
write(EncodingState encodingState,
java.lang.String str,
int off,
int len)
Append a portion of a string to the buffer and attach the encodingState
information to it
|
append, append, append, appendEncoded, appendEncoded, encodeAndWrite, isIgnoreEncodingState, setIgnoreEncodingState, shouldEncode, shouldEncodeWithpublic WriterEncodedAppender(java.io.Writer target)
target - the target writerpublic void flush()
throws java.io.IOException
EncodedAppenderflush in interface EncodedAppenderflush in class AbstractEncodedAppenderjava.io.IOException - Signals that an I/O exception has occurred.protected void write(EncodingState encodingState, char[] b, int off, int len) throws java.io.IOException
AbstractEncodedAppenderwrite in class AbstractEncodedAppenderencodingState - the new encoding state of the char arrayb - a char arrayoff - Offset from which to start encoding characterslen - Number of characters to encodejava.io.IOException - Signals that an I/O exception has occurred.protected void write(EncodingState encodingState, java.lang.String str, int off, int len) throws java.io.IOException
AbstractEncodedAppenderwrite in class AbstractEncodedAppenderencodingState - the new encoding state of the stringstr - A Stringoff - Offset from which to start encoding characterslen - Number of characters to encodejava.io.IOException - Signals that an I/O exception has occurred.protected void appendCharSequence(EncodingState encodingState, java.lang.CharSequence csq, int start, int end) throws java.io.IOException
AbstractEncodedAppenderappendCharSequence in class AbstractEncodedAppenderencodingState - the new encoding state of the CharSequence portioncsq - a CharSequencestart - the start index, inclusiveend - the end index, exclusivejava.io.IOException - Signals that an I/O exception has occurred.public void close()
throws java.io.IOException
java.io.IOExceptionprotected EncodingState createNewEncodingState(Encoder encoder, EncodingState encodingState)
createNewEncodingState in class AbstractEncodedAppender