| 构造器和说明 |
|---|
CodecDefault(Config config) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
decodeString(CodecReader reader,
ByteBuffer buf,
int maxLen)
解码时,以换行符为间隔
|
Frame |
read(CodecReader reader)
解码
|
<T extends CodecWriter> |
write(Frame frame,
Function<Integer,T> writerFactory)
编码
|
public CodecDefault(Config config)
public <T extends CodecWriter> T write(Frame frame, Function<Integer,T> writerFactory) throws IOException
write 在接口中 Codecframe - 帧writerFactory - 书写器工厂IOExceptionpublic Frame read(CodecReader reader)
protected String decodeString(CodecReader reader, ByteBuffer buf, int maxLen)
reader - 读取器buf - 复用缓冲maxLen - 最大长度Copyright © 2024. All rights reserved.