TextLineEncoder

A {@link ProtocolEncoder} which encodes a string into a text line which ends with the delimiter.

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

Constructors

this
this()

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

this
this(string delimiter)

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

this
this(LineDelimiter delimiter)

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

Members

Functions

dispose
void dispose()

Dispose the encoder

encode
void encode(Object message, Connection connection)

{@inheritDoc}

getMaxLineLength
int getMaxLineLength()

@return the allowed maximum size of the encoded line. If the size of the encoded line exceeds this value, the encoder will throw a {@link IllegalArgumentException}. The default value is {@link Integer#MAX_VALUE}.

setMaxLineLength
void setMaxLineLength(int maxLineLength)

Sets the allowed maximum size of the encoded line. If the size of the encoded line exceeds this value, the encoder will throw a {@link IllegalArgumentException}. The default value is {@link Integer#MAX_VALUE}.

Inherited Members

From EncoderChain

next
EncoderChain next;
Undocumented in source.
_bufferSize
int _bufferSize;
Undocumented in source.
getNext
EncoderChain getNext()
Undocumented in source. Be warned that the author may not have intended to support it.
setNext
void setNext(EncoderChain next)
Undocumented in source. Be warned that the author may not have intended to support it.
setBufferSize
void setBufferSize(int size)
Undocumented in source. Be warned that the author may not have intended to support it.
encode
void encode(Object message, Connection connection)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta