Class TCPNIOUtils
- java.lang.Object
-
- org.glassfish.grizzly.nio.transport.TCPNIOUtils
-
public class TCPNIOUtils extends Object
TCP NIO Transport utils- Author:
- Alexey Stashok
-
-
Constructor Summary
Constructors Constructor Description TCPNIOUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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)
-
-
-
Method Detail
-
writeCompositeBuffer
public static int writeCompositeBuffer(TCPNIOConnection connection, CompositeBuffer buffer) throws IOException
- Throws:
IOException
-
writeSimpleBuffer
public static int writeSimpleBuffer(TCPNIOConnection connection, Buffer buffer) throws IOException
- Throws:
IOException
-
flushByteBuffer
public static int flushByteBuffer(SocketChannel channel, ByteBuffer byteBuffer) throws IOException
- Throws:
IOException
-
flushByteBuffers
public static int flushByteBuffers(SocketChannel channel, ByteBuffer[] byteBuffer, int firstBufferOffest, int numberOfBuffers) throws IOException
- Throws:
IOException
-
allocateAndReadBuffer
public static Buffer allocateAndReadBuffer(TCPNIOConnection connection) throws IOException
- Throws:
IOException
-
readBuffer
public static int readBuffer(TCPNIOConnection connection, Buffer buffer) throws IOException
- Throws:
IOException
-
readCompositeBuffer
public static int readCompositeBuffer(TCPNIOConnection connection, CompositeBuffer buffer) throws IOException
- Throws:
IOException
-
readSimpleBuffer
public static int readSimpleBuffer(TCPNIOConnection connection, Buffer buffer) throws IOException
- Throws:
IOException
-
-