Package org.grails.encoder
Class StreamingEncoderEncodedAppender
java.lang.Object
org.grails.encoder.AbstractEncodedAppender
org.grails.encoder.StreamingEncoderEncodedAppender
- All Implemented Interfaces:
EncodedAppender
EncodedAppender implementation used for piping / chaining several StreamingEncoders
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingEncoderEncodedAppender(StreamingEncoder encoder, EncodedAppender target) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendCharSequence(EncodingState encodingState, CharSequence str, int start, int end) Append a portion of a CharSequence to the buffer and attach the encodingState information to itvoidclose()voidflush()Flush the internal buffer and write the buffered input to a possible destination.protected voidwrite(EncodingState encodingState, char[] b, int off, int len) Append a portion of a char array to the buffer and attach the encodingState information to itprotected voidwrite(EncodingState encodingState, String str, int off, int len) Append a portion of a string to the buffer and attach the encodingState information to itMethods inherited from class org.grails.encoder.AbstractEncodedAppender
append, append, append, appendEncoded, appendEncoded, createNewEncodingState, encodeAndWrite, isIgnoreEncodingState, setIgnoreEncodingState, shouldEncode, shouldEncodeWith
-
Constructor Details
-
StreamingEncoderEncodedAppender
-
-
Method Details
-
close
- Throws:
IOException
-
flush
Description copied from interface:EncodedAppenderFlush the internal buffer and write the buffered input to a possible destination.- Specified by:
flushin interfaceEncodedAppender- Overrides:
flushin classAbstractEncodedAppender- Throws:
IOException- Signals that an I/O exception has occurred.
-
write
Description copied from class:AbstractEncodedAppenderAppend a portion of a char array to the buffer and attach the encodingState information to it- Specified by:
writein classAbstractEncodedAppender- Parameters:
encodingState- the new encoding state of the char arrayb- a char arrayoff- Offset from which to start encoding characterslen- Number of characters to encode- Throws:
IOException- Signals that an I/O exception has occurred.
-
write
Description copied from class:AbstractEncodedAppenderAppend a portion of a string to the buffer and attach the encodingState information to it- Specified by:
writein classAbstractEncodedAppender- Parameters:
encodingState- the new encoding state of the stringstr- A Stringoff- Offset from which to start encoding characterslen- Number of characters to encode- Throws:
IOException- Signals that an I/O exception has occurred.
-
appendCharSequence
protected void appendCharSequence(EncodingState encodingState, CharSequence str, int start, int end) throws IOException Description copied from class:AbstractEncodedAppenderAppend a portion of a CharSequence to the buffer and attach the encodingState information to it- Specified by:
appendCharSequencein classAbstractEncodedAppender- Parameters:
encodingState- the new encoding state of the CharSequence portionstr- a CharSequencestart- the start index, inclusiveend- the end index, exclusive- Throws:
IOException- Signals that an I/O exception has occurred.
-