Class OutputWriter


  • public final class OutputWriter
    extends Object
    NIO utility to flush ByteBuffer
    Author:
    Scott Oaks, Alexey Stashok
    • Constructor Detail

      • OutputWriter

        public OutputWriter()
    • Method Detail

      • flushChannel

        public static void flushChannel​(SocketChannel socketChannel,
                                        ByteBuffer bb)
                                 throws IOException
        Flush the buffer by looping until the ByteBuffer is empty
        Parameters:
        bb - the ByteBuffer to write.
        Throws:
        IOException
      • flushChannel

        public static void flushChannel​(SocketChannel socketChannel,
                                        ByteBuffer[] bb)
                                 throws IOException
        Flush the buffer by looping until the ByteBuffer is empty
        Parameters:
        bb - the ByteBuffer to write.
        Throws:
        IOException