Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.codehaus.groovy.grails.support.encoding
[Java] Interface StreamingEncoder

    org.codehaus.groovy.grails.support.encoding.StreamingEncoder
      org.codehaus.groovy.grails.support.encoding.Encoder
          org.codehaus.groovy.grails.support.encoding.CodecIdentifierProvider

All Superinterfaces:
  Encoder, CodecIdentifierProvider

    public interface StreamingEncoder
    extends Encoder

Streaming encoder interface that makes it possible to encode a portion of a CharSequence and append it directly to the EncodedAppender instance. This solution makes it possible to just check if the input is ok and only replace the characters in the input that have to be escaped.

Authors:
  Lari Hotari

Since:
  2.3

Method Summary
`void` | `encodeToStream(Encoder thisInstance, java.lang.CharSequence source, int offset, int len, EncodedAppender appender, EncodingState encodingState)` Encode and append portion of source CharSequence to the appender.

Methods inherited from interface Encoder
encode, isApplyToSafelyEncoded, isSafe, markEncoded

Methods inherited from interface CodecIdentifierProvider
getCodecIdentifier

Method Detail

### encodeToStream

    public void encodeToStream(Encoder thisInstance, java.lang.CharSequence source, int offset, int len, EncodedAppender appender, EncodingState encodingState)

  Encode and append portion of source CharSequence to the appender.
  throws:
    IOException Signals that an I/O exception has occurred.
  Parameters:
    `source` - The source CharSequence
    `offset` - Offset from which to start encoding characters
    `len` - Number of characters to encode
    `appender` - the appender to write to
    `encodingState` - the current encoding state

Groovy Documentation