java.lang.Object
org.glassfish.grizzly.nio.transport.TCPNIOUtils
TCP NIO Transport utils
- Author:
- Alexey Stashok
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferallocateAndReadBuffer(TCPNIOConnection connection) static intflushByteBuffer(SocketChannel channel, ByteBuffer byteBuffer) static intflushByteBuffers(SocketChannel channel, ByteBuffer[] byteBuffer, int firstBufferOffest, int numberOfBuffers) static intreadBuffer(TCPNIOConnection connection, Buffer buffer) static intreadCompositeBuffer(TCPNIOConnection connection, CompositeBuffer buffer) static intreadSimpleBuffer(TCPNIOConnection connection, Buffer buffer) static intwriteCompositeBuffer(TCPNIOConnection connection, CompositeBuffer buffer) static intwriteSimpleBuffer(TCPNIOConnection connection, Buffer buffer)
-
Constructor Details
-
TCPNIOUtils
public TCPNIOUtils()
-
-
Method Details
-
writeCompositeBuffer
public static int writeCompositeBuffer(TCPNIOConnection connection, CompositeBuffer buffer) throws IOException - Throws:
IOException
-
writeSimpleBuffer
- Throws:
IOException
-
flushByteBuffer
- Throws:
IOException
-
flushByteBuffers
public static int flushByteBuffers(SocketChannel channel, ByteBuffer[] byteBuffer, int firstBufferOffest, int numberOfBuffers) throws IOException - Throws:
IOException
-
allocateAndReadBuffer
- Throws:
IOException
-
readBuffer
- Throws:
IOException
-
readCompositeBuffer
public static int readCompositeBuffer(TCPNIOConnection connection, CompositeBuffer buffer) throws IOException - Throws:
IOException
-
readSimpleBuffer
- Throws:
IOException
-