|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.comm.codec.Encoder<Object,ByteBuffer>
com.kuka.comm.codec.bytebuffer.TokenEncoder
public final class TokenEncoder
Encoder that writes a constant byte sequence.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.kuka.comm.codec.Encoder |
|---|
Encoder.EncoderContext |
| Constructor Summary | |
|---|---|
TokenEncoder(byte[] token)
Creates an encoder that writes the given byte subsequence (token). |
|
TokenEncoder(String token)
Creates an encoder that writes the given byte subsequence (token). |
|
TokenEncoder(String token,
Charset charset)
Creates an encoder that writes the given byte subsequence (token). |
|
| Method Summary | |
|---|---|
protected void |
encodeImpl(Object in,
ByteBuffer out)
Override this method to implement encoding process. |
| Methods inherited from class com.kuka.comm.codec.Encoder |
|---|
concat, encode, encodeImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TokenEncoder(String token)
Charset.defaultCharset().
token - the token to write
public TokenEncoder(String token,
Charset charset)
token - the token to writecharset - the charset of the stringpublic TokenEncoder(byte[] token)
token - the token to write| Method Detail |
|---|
protected void encodeImpl(Object in,
ByteBuffer out)
Encoder
Note: You should override either this method or Encoder.encodeImpl(Object, Object, EncoderContext).
Overriding both will have no effect, i.e. only Encoder.encodeImpl(Object, Object, EncoderContext) will be
called.
encodeImpl in class Encoder<Object,ByteBuffer>in - the input for this encoderout - the output for this encoderEncoder.encodeImpl(Object, Object, EncoderContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||