Class SocketChannelIOHelper


  • public class SocketChannelIOHelper
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean batch​(WebSocketImpl ws, java.nio.channels.ByteChannel sockchannel)
      Returns whether the whole outQueue has been flushed
      static boolean read​(java.nio.ByteBuffer buf, WebSocketImpl ws, java.nio.channels.ByteChannel channel)  
      static boolean readMore​(java.nio.ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SocketChannelIOHelper

        private SocketChannelIOHelper()
    • Method Detail

      • read

        public static boolean read​(java.nio.ByteBuffer buf,
                                   WebSocketImpl ws,
                                   java.nio.channels.ByteChannel channel)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • batch

        public static boolean batch​(WebSocketImpl ws,
                                    java.nio.channels.ByteChannel sockchannel)
                             throws java.io.IOException
        Returns whether the whole outQueue has been flushed
        Parameters:
        ws - The WebSocketImpl associated with the channels
        sockchannel - The channel to write to
        Returns:
        returns Whether there is more data to write
        Throws:
        java.io.IOException - May be thrown by WrappedByteChannel.writeMore()