public class StringDecoderHandler extends Object implements PipeHandler<ByteBuf,String>
ByteBuf into a String.
Please note that this decoder must be used with a proper ByteBuf to String
such as DelimiterBasedFrameHandler or LineBasedFrameHandler
if you are using a stream-based transport such as TCP/IP.
A typical setup for a text-based line protocol in a TCP/IP socket| 构造器和说明 |
|---|
StringDecoderHandler()
Creates a new instance with the current system character set.
|
StringDecoderHandler(Charset charset)
Creates a new instance with the specified character set.
|
| 限定符和类型 | 方法和说明 |
|---|---|
PipeStatus |
onMessage(PipeContext context,
PipeRcvQueue<ByteBuf> src,
PipeSndQueue<String> dst) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonActive, onClose, onError, onInitpublic StringDecoderHandler()
public StringDecoderHandler(Charset charset)
public PipeStatus onMessage(PipeContext context, PipeRcvQueue<ByteBuf> src, PipeSndQueue<String> dst)
onMessage 在接口中 PipeHandler<ByteBuf,String>Copyright © 2022–2024. All rights reserved.