public interface EncodedAppender
| Modifier and Type | Method and Description |
|---|---|
void |
append(Encoder encoder,
EncodingState encodingState,
char[] b,
int off,
int len)
Encodes a portion of a char array and appends it to the buffer.
|
void |
append(Encoder encoder,
EncodingState encodingState,
java.lang.CharSequence str,
int off,
int len)
Encodes a portion of a string and appends it to the buffer.
|
void |
append(Encoder encoder,
StreamEncodeable streamEncodeable)
Encodes a
StreamEncodeable instance and appends it to the buffer. |
void |
appendEncoded(Encoder encoder,
EncodingState encodingState,
char[] b,
int off,
int len)
Appends an encoded portion of a char array to the buffer.
|
void |
appendEncoded(Encoder encoder,
EncodingState encodingState,
java.lang.CharSequence str,
int off,
int len)
Appends an encoded portion of a string to the buffer
|
void |
close() |
void |
flush()
Flush the internal buffer and write the buffered input to a possible
destination.
|
boolean |
isIgnoreEncodingState() |
void |
setIgnoreEncodingState(boolean ignoreEncodingState)
When enabled, will encode all input regardless of it's current state
disables double-encoding prevention.
|
boolean |
shouldEncode(Encoder encoderToApply,
EncodingState encodingState)
Check if the encoder should be used to a input with certain encodingState
|
void append(Encoder encoder, EncodingState encodingState, java.lang.CharSequence str, int off, int len) throws java.io.IOException
encoder - the encoder to useencodingState - the current 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.void appendEncoded(Encoder encoder, EncodingState encodingState, java.lang.CharSequence str, int off, int len) throws java.io.IOException
encoder - the encoder that has been appliedencodingState - the previous 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.void append(Encoder encoder, EncodingState encodingState, char[] b, int off, int len) throws java.io.IOException
encoder - the encoder to useencodingState - the current encoding state of the stringb - 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.void appendEncoded(Encoder encoder, EncodingState encodingState, char[] b, int off, int len) throws java.io.IOException
encoder - the encoder that has been appliedencodingState - the previous 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.void append(Encoder encoder, StreamEncodeable streamEncodeable) throws java.io.IOException
StreamEncodeable instance and appends it to the buffer.encoder - the encoder to usestreamEncodeable - the instance to encodejava.io.IOException - Signals that an I/O exception has occurred.void flush()
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.void close()
throws java.io.IOException
java.io.IOExceptionvoid setIgnoreEncodingState(boolean ignoreEncodingState)
ignoreEncodingState - boolean isIgnoreEncodingState()
boolean shouldEncode(Encoder encoderToApply, EncodingState encodingState)
encoderToApply - the encoder to applyencodingState - the current encoding state