Top Description Fields Constructors Methods
org.glassfish.grizzly.utils

public Class StringEncoder

extends AbstractTransformer<String, Buffer>
Class Inheritance
Imports
java.io.UnsupportedEncodingException, java.nio.charset.Charset, org.glassfish.grizzly.AbstractTransformer, .Buffer, .TransformationException, .TransformationResult, org.glassfish.grizzly.attributes.AttributeStorage

String decoder, which decodes Buffer to String
Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
protected Charset
protected String
Inherited from org.glassfish.grizzly.AbstractTransformer:
attributeBuilderstateAttr

Constructor Summary

AccessConstructor and Description
public
public
StringEncoder(final String stringTerminator)

public
StringEncoder(final Charset charset)

public
StringEncoder(final Charset charset, final String stringTerminator)

Method Summary

Modifier and TypeMethod and Description
public Charset
public String
getName()

Implements org.glassfish.grizzly.Transformer.getName.

Get the Transformer name.

public boolean
public void
setCharset(final Charset charset)

protected TransformationResult<String, Buffer>
Inherited from org.glassfish.grizzly.AbstractTransformer:
createStateObjectgetLastResultgetMemoryManagergetNamePrefixgetValueobtainMemoryManagerobtainStateObjectreleasesaveLastResultsetMemoryManagertransform

Field Detail

charsetback to summary
protected Charset charset
stringTerminatorback to summary
protected String stringTerminator

Constructor Detail

StringEncoderback to summary
public StringEncoder()
StringEncoderback to summary
public StringEncoder(final String stringTerminator)
StringEncoderback to summary
public StringEncoder(final Charset charset)
Annotations
@SuppressWarnings:unused
StringEncoderback to summary
public StringEncoder(final Charset charset, final String stringTerminator)

Method Detail

getCharsetback to summary
public Charset getCharset()
getNameback to summary
public String getName()

Implements org.glassfish.grizzly.Transformer.getName.

Doc from org.glassfish.grizzly.Transformer.getName.

Get the Transformer name. The name is used to store Transformer associated data.

Annotations
@Override
hasInputRemainingback to summary
public boolean hasInputRemaining(final AttributeStorage storage, final String input)

Implements org.glassfish.grizzly.Transformer.hasInputRemaining.

Annotations
@Override
setCharsetback to summary
public void setCharset(final Charset charset)
transformImplback to summary
protected TransformationResult<String, Buffer> transformImpl(final AttributeStorage storage, String input) throws TransformationException

Implements abstract org.glassfish.grizzly.AbstractTransformer.transformImpl.

Annotations
@Override