Package org.grails.encoder.impl
Class NoneEncoder
java.lang.Object
org.grails.encoder.impl.NoneEncoder
- All Implemented Interfaces:
CodecIdentifierProvider,Encoder,StreamingEncoder
- Since:
- 2.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEncode given input objectvoidencodeToStream(Encoder thisInstance, CharSequence source, int offset, int len, EncodedAppender appender, EncodingState encodingState) Encode and append portion of source CharSequence to the appender.Gets the codec identifier information.booleanbooleanisSafe()Checks if this encoder is XSS "safe".voidmarkEncoded(CharSequence string) Mark this instance as encoded with this encoder in the currentEncodingStateRegistry
-
Constructor Details
-
NoneEncoder
public NoneEncoder()
-
-
Method Details
-
encode
Description copied from interface:EncoderEncode given input object -
isSafe
public boolean isSafe()Description copied from interface:EncoderChecks if this encoder is XSS "safe". This means that after appling this encoder, the characters have been escaped and are XSS safe to be included in HTML documents. -
isApplyToSafelyEncoded
public boolean isApplyToSafelyEncoded()- Specified by:
isApplyToSafelyEncodedin interfaceEncoder- Returns:
trueif this this codec should be applied to a buffer part that is already encoded with a safe encoder
-
markEncoded
Description copied from interface:EncoderMark this instance as encoded with this encoder in the currentEncodingStateRegistry- Specified by:
markEncodedin interfaceEncoder- Parameters:
string- a CharSequence to mark as encoded
-
getCodecIdentifier
Description copied from interface:CodecIdentifierProviderGets the codec identifier information.- Specified by:
getCodecIdentifierin interfaceCodecIdentifierProvider- Returns:
- the codec identifier information
-
encodeToStream
public void encodeToStream(Encoder thisInstance, CharSequence source, int offset, int len, EncodedAppender appender, EncodingState encodingState) throws IOException Description copied from interface:StreamingEncoderEncode and append portion of source CharSequence to the appender.- Specified by:
encodeToStreamin interfaceStreamingEncodersource- The source CharSequenceoffset- Offset from which to start encoding characterslen- Number of characters to encodeappender- the appender to write toencodingState- the current encoding state- Throws:
IOException- Signals that an I/O exception has occurred.
-