|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.filter.codec.ProtocolEncoderAdapter
org.apache.mina.filter.codec.textline.TextLineEncoder
public class TextLineEncoder
A ProtocolEncoder
which encodes a string into a text line
which ends with the delimiter.
Constructor Summary | |
---|---|
TextLineEncoder()
Creates a new instance with the current default Charset
and LineDelimiter.UNIX delimiter. |
|
TextLineEncoder(Charset charset)
Creates a new instance with the spcified charset and LineDelimiter.UNIX delimiter. |
|
TextLineEncoder(Charset charset,
LineDelimiter delimiter)
Creates a new instance with the spcified charset and the specified delimiter. |
|
TextLineEncoder(Charset charset,
String delimiter)
Creates a new instance with the spcified charset and the specified delimiter. |
|
TextLineEncoder(LineDelimiter delimiter)
Creates a new instance with the current default Charset
and the specified delimiter. |
|
TextLineEncoder(String delimiter)
Creates a new instance with the current default Charset
and the specified delimiter. |
Method Summary | |
---|---|
void |
dispose()
|
void |
encode(IoSession session,
Object message,
ProtocolEncoderOutput out)
Encodes higher-level message objects into binary or protocol-specific data. |
int |
getMaxLineLength()
Returns the allowed maximum size of the encoded line. |
void |
setMaxLineLength(int maxLineLength)
Sets the allowed maximum size of the encoded line. |
Methods inherited from class org.apache.mina.filter.codec.ProtocolEncoderAdapter |
---|
dispose |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextLineEncoder()
Charset
and LineDelimiter.UNIX
delimiter.
public TextLineEncoder(String delimiter)
Charset
and the specified delimiter.
public TextLineEncoder(LineDelimiter delimiter)
Charset
and the specified delimiter.
public TextLineEncoder(Charset charset)
LineDelimiter.UNIX
delimiter.
public TextLineEncoder(Charset charset, String delimiter)
public TextLineEncoder(Charset charset, LineDelimiter delimiter)
Method Detail |
---|
public int getMaxLineLength()
IllegalArgumentException
. The default value
is Integer.MAX_VALUE
.
public void setMaxLineLength(int maxLineLength)
IllegalArgumentException
. The default value
is Integer.MAX_VALUE
.
public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception
ProtocolEncoder
ProtocolEncoder.encode(IoSession, Object, ProtocolEncoderOutput)
method with message which is popped from the session write queue, and then
the encoder implementation puts encoded messages (typically IoBuffer
s)
into ProtocolEncoderOutput
.
Exception
- if the message violated protocol specificationpublic void dispose() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |