- All Implemented Interfaces:
Transformer<Buffer,String>
- Author:
- Alexey Stashok
-
Nested Class Summary
Nested classes/interfaces inherited from class org.glassfish.grizzly.AbstractTransformer
AbstractTransformer.LastResultAwareState<K,L> -
Field Summary
FieldsFields inherited from class org.glassfish.grizzly.AbstractTransformer
attributeBuilder, stateAttr -
Constructor Summary
ConstructorsConstructorDescriptionStringDecoder(String stringTerminator) StringDecoder(Charset charset) StringDecoder(Charset charset, String stringTerminator) -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the Transformer name.booleanhasInputRemaining(AttributeStorage storage, Buffer input) protected TransformationResult<Buffer,String> parseWithLengthPrefix(AttributeStorage storage, Buffer input) protected TransformationResult<Buffer,String> parseWithTerminatingSeq(AttributeStorage storage, Buffer input) voidrelease(AttributeStorage storage) The Transformer has done its work and can release all associated resource.voidsetCharset(Charset charset) protected TransformationResult<Buffer,String> transformImpl(AttributeStorage storage, Buffer input) Methods inherited from class org.glassfish.grizzly.AbstractTransformer
createStateObject, getLastResult, getMemoryManager, getNamePrefix, getValue, obtainMemoryManager, obtainStateObject, saveLastResult, setMemoryManager, transform
-
Field Details
-
charset
-
lengthAttribute
-
stringTerminateBytes
protected byte[] stringTerminateBytes
-
-
Constructor Details
-
StringDecoder
public StringDecoder() -
StringDecoder
-
StringDecoder
-
StringDecoder
-
-
Method Details
-
getName
Description copied from interface:TransformerGet the Transformer name. The name is used to store Transformer associated data.- Returns:
- The Transformer name.
-
transformImpl
protected TransformationResult<Buffer,String> transformImpl(AttributeStorage storage, Buffer input) throws TransformationException - Specified by:
transformImplin classAbstractTransformer<Buffer,String> - Throws:
TransformationException
-
parseWithLengthPrefix
protected TransformationResult<Buffer,String> parseWithLengthPrefix(AttributeStorage storage, Buffer input) -
parseWithTerminatingSeq
protected TransformationResult<Buffer,String> parseWithTerminatingSeq(AttributeStorage storage, Buffer input) -
release
Description copied from interface:TransformerThe Transformer has done its work and can release all associated resource.- Specified by:
releasein interfaceTransformer<Buffer,String> - Overrides:
releasein classAbstractTransformer<Buffer,String> - Parameters:
storage- the external state storage, where Transformer could retrieve or store its state.
-
hasInputRemaining
-
getCharset
-
setCharset
-