org.craft.atom.protocol.textline
Class TextLineDecoder
java.lang.Object
org.craft.atom.protocol.AbstractProtocolCodec
org.craft.atom.protocol.AbstractProtocolDecoder
org.craft.atom.protocol.textline.TextLineDecoder
- All Implemented Interfaces:
- ProtocolDecoder<String>
public class TextLineDecoder
- extends AbstractProtocolDecoder
- implements ProtocolDecoder<String>
A ProtocolDecoder which decodes bytes into text line string, default charset is utf-8
Not thread safe
- Version:
- 1.0, Oct 16, 2012
- Author:
- Hu Feng
| Methods inherited from class org.craft.atom.protocol.AbstractProtocolDecoder |
getBuf, getDefaultBufferSize, getMaxSize, getSearchIndex, getSplitIndex, getStateIndex, reset, setBuf, setDefaultBufferSize, setMaxSize, setSearchIndex, setSplitIndex, setStateIndex, toString |
TextLineDecoder
public TextLineDecoder()
TextLineDecoder
public TextLineDecoder(Charset charset)
TextLineDecoder
public TextLineDecoder(Charset charset,
String delimiter)
TextLineDecoder
public TextLineDecoder(Charset charset,
String delimiter,
int defaultBufferSize)
TextLineDecoder
public TextLineDecoder(Charset charset,
String delimiter,
int defaultBufferSize,
int maxLineLength)
decode
public List<String> decode(byte[] bytes)
throws ProtocolException
- Specified by:
decode in interface ProtocolDecoder<String>
- Throws:
ProtocolException
Copyright © 2014. All Rights Reserved.