Groovy Documentation

org.codehaus.groovy.grails.support.encoding
[Java] Interface EncodedAppender


public interface EncodedAppender

This is the input interface to the streaming encoding solution. Methods in this interface encode the given input and append it to the internal buffer

Authors:
Lari Hotari
Since:
2.3


Method Summary
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, 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, StreamEncodeable streamEncodeable)

Encodes a StreamEncodeable instance and appends it to the buffer.

void append(Encoder encoder, char ch)

Encodes a single char and appends it 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 appendEncoded(Encoder encoder, EncodingState encodingState, char[] b, int off, int len)

Appends an encoded portion of a char array to the buffer.

void close()

void flush()

Flush the internal buffer and write the buffered input to a possible destination.

 

Method Detail

append

public 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.
throws:
IOException Signals that an I/O exception has occurred.
Parameters:
encoder - the encoder to use
encodingState - the current encoding state of the string
str - A String
off - Offset from which to start encoding characters
len - Number of characters to encode


append

public 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.
throws:
IOException Signals that an I/O exception has occurred.
Parameters:
encoder - the encoder to use
encodingState - the current encoding state of the string
b - a char array
off - Offset from which to start encoding characters
len - Number of characters to encode


append

public void append(Encoder encoder, StreamEncodeable streamEncodeable)
Encodes a StreamEncodeable instance and appends it to the buffer.
throws:
IOException Signals that an I/O exception has occurred.
Parameters:
encoder - the encoder to use
streamEncodeable - the instance to encode


append

public void append(Encoder encoder, char ch)
Encodes a single char and appends it to the buffer.
throws:
IOException Signals that an I/O exception has occurred.
Parameters:
encoder - the encoder to use
ch - a char


appendEncoded

public void appendEncoded(Encoder encoder, EncodingState encodingState, java.lang.CharSequence str, int off, int len)
Appends an encoded portion of a string to the buffer
throws:
IOException Signals that an I/O exception has occurred.
Parameters:
encoder - the encoder that has been applied
encodingState - the previous encoding state of the string
str - A String
off - Offset from which to start encoding characters
len - Number of characters to encode


appendEncoded

public void appendEncoded(Encoder encoder, EncodingState encodingState, char[] b, int off, int len)
Appends an encoded portion of a char array to the buffer.
throws:
IOException Signals that an I/O exception has occurred.
Parameters:
encoder - the encoder that has been applied
encodingState - the previous encoding state of the char array
b - a char array
off - Offset from which to start encoding characters
len - Number of characters to encode


close

public void close()


flush

public void flush()
Flush the internal buffer and write the buffered input to a possible destination.
throws:
IOException Signals that an I/O exception has occurred.


 

Groovy Documentation