Package org.grails.encoder
Class StreamingEncoderEncodedAppender
- java.lang.Object
-
- org.grails.encoder.AbstractEncodedAppender
-
- org.grails.encoder.StreamingEncoderEncodedAppender
-
- All Implemented Interfaces:
EncodedAppender
public class StreamingEncoderEncodedAppender extends AbstractEncodedAppender
EncodedAppender implementation used for piping / chaining several StreamingEncoders
-
-
Constructor Summary
Constructors Constructor Description StreamingEncoderEncodedAppender(StreamingEncoder encoder, EncodedAppender target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendCharSequence(EncodingState encodingState, java.lang.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, java.lang.String str, int off, int len)Append a portion of a string to the buffer and attach the encodingState information to it-
Methods inherited from class org.grails.encoder.AbstractEncodedAppender
append, append, append, appendEncoded, appendEncoded, createNewEncodingState, encodeAndWrite, isIgnoreEncodingState, setIgnoreEncodingState, shouldEncode, shouldEncodeWith
-
-
-
-
Constructor Detail
-
StreamingEncoderEncodedAppender
public StreamingEncoderEncodedAppender(StreamingEncoder encoder, EncodedAppender target)
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOExceptionDescription copied from interface:EncodedAppenderFlush the internal buffer and write the buffered input to a possible destination.- Specified by:
flushin interfaceEncodedAppender- Overrides:
flushin classAbstractEncodedAppender- Throws:
java.io.IOException- Signals that an I/O exception has occurred.
-
write
protected void write(EncodingState encodingState, char[] b, int off, int len) throws java.io.IOException
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:
java.io.IOException- Signals that an I/O exception has occurred.
-
write
protected void write(EncodingState encodingState, java.lang.String str, int off, int len) throws java.io.IOException
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:
java.io.IOException- Signals that an I/O exception has occurred.
-
appendCharSequence
protected void appendCharSequence(EncodingState encodingState, java.lang.CharSequence str, int start, int end) throws java.io.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:
java.io.IOException- Signals that an I/O exception has occurred.
-
-