TextLineDecoder

A {@link ProtocolDecoder} which decodes a text line into a string.

@author <a href="http://mina.apache.org">Apache MINA Project</a>

Constructors

this
this()
Undocumented in source.
this
this(DecoderChain nextDecoder)

Creates a new instance with the current default {@link Charset} and {@link LineDelimiter#AUTO} delimiter.

this
this(string delimiter, DecoderChain nextDecoder)

Creates a new instance with the current default {@link Charset} and the specified <tt>delimiter</tt>.

this
this(LineDelimiter delimiter, DecoderChain nextDecoder)

Creates a new instance with the current default {@link Charset} and the specified <tt>delimiter</tt>.

Members

Functions

decode
DataHandleStatus decode(ByteBuffer buf, Connection connection)

{@inheritDoc}

dispose
void dispose(Connection connection)

{@inheritDoc}

getBufferLength
int getBufferLength()

@return the allowed buffer size used to store the decoded line in the Context instance.

getMaxLineLength
int getMaxLineLength()

@return the allowed maximum size of the line to be decoded. If the size of the line to be decoded exceeds this value, the decoder will throw a {@link BufferDataException}. The default value is <tt>1024</tt> (1KB).

setBufferLength
void setBufferLength(int bufferLength)

Sets the default buffer size. This buffer is used in the Context to store the decoded line.

setMaxLineLength
void setMaxLineLength(int maxLineLength)

Sets the allowed maximum size of the line to be decoded. If the size of the line to be decoded exceeds this value, the decoder will throw a {@link BufferDataException}. The default value is <tt>1024</tt> (1KB).

Inherited Members

From DecoderChain

_nextDecoder
DecoderChain _nextDecoder;
Undocumented in source.
getNext
DecoderChain getNext()
Undocumented in source. Be warned that the author may not have intended to support it.
decode
DataHandleStatus decode(ByteBuffer buf, Connection connection)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta