ChannelFunctionpublic class UTF8Checker extends java.lang.Object implements ChannelFunction
Please use a new instance per stream.
| Constructor | Description |
|---|---|
UTF8Checker() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
afterRead(java.nio.ByteBuffer buf,
int position,
int length) |
Is called on the
ByteBuffer after a read operation completes |
void |
beforeWrite(java.nio.ByteBuffer buf,
int position,
int length) |
Is called on the
ByteBuffer before a write operation completes |
void |
complete() |
Is called to complete the
ChannelFunction. |
void |
newFrame(FrameHeaderData headerData) |
public void newFrame(FrameHeaderData headerData)
newFrame in interface ChannelFunctionpublic void afterRead(java.nio.ByteBuffer buf,
int position,
int length)
throws java.io.IOException
ChannelFunctionByteBuffer after a read operation completesafterRead in interface ChannelFunctionbuf - the ByteBuffer to operate onposition - the index in the ByteBuffer to start fromlength - the number of bytes to operate onjava.io.IOException - thrown if an error occurspublic void beforeWrite(java.nio.ByteBuffer buf,
int position,
int length)
throws java.io.UnsupportedEncodingException
ChannelFunctionByteBuffer before a write operation completesbeforeWrite in interface ChannelFunctionbuf - the ByteBuffer to operate onposition - the index in the ByteBuffer to start fromlength - the number of bytes to operate onjava.io.UnsupportedEncodingExceptionpublic void complete()
throws java.io.UnsupportedEncodingException
ChannelFunctionChannelFunction. Access it after complete
is called may result in unexpected behavior.complete in interface ChannelFunctionjava.io.UnsupportedEncodingExceptionCopyright © 2018. All rights reserved.