public class LineCodec extends Object implements ICodec<String>
In its implementation, we convert buffers as new lines when they arrive. Always call the method getNextItems() after append() to avoid OutOfMemory errors.
| Constructor and Description | 
|---|
| LineCodec(int capacity)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | append(char[] array,
      int len)Add some data taken from an input char array | 
| void | append(String s)Add some data to the decoder | 
| void | flush()flush buffer | 
| List<String> | getNextItems()Check and return some (not necessary all) found items if any. | 
| ECodec | getType() | 
public LineCodec(int capacity)
capacity - the buffer capacitypublic List<String> getNextItems()
ICodecgetNextItems in interface ICodec<String>public void append(String s)
public void append(char[] array,
                   int len)
public void flush()
ICodecCopyright © 2022. All rights reserved.