Class NIOHelper

java.lang.Object
com.peterphi.std.io.nio.NIOHelper

public class NIOHelper extends Object
  • Constructor Details

    • NIOHelper

      public NIOHelper()
  • Method Details

    • intsToBytes

      public static byte[] intsToBytes(int[] n)
    • intsToBytes

      public static byte[] intsToBytes(List<Integer> n)
    • bytesToInts

      public static int[] bytesToInts(byte[] bytes)
    • intToBytes

      public static byte[] intToBytes(int n)
    • longToBytes

      public static byte[] longToBytes(long n)
    • bytesToInt

      public static int bytesToInt(byte[] bytes)
    • bytesToLong

      public static long bytesToLong(byte[] bytes)
    • bytesToLong

      public static long bytesToLong(ByteBuffer b)
    • bytesToInt

      public static int bytesToInt(ByteBuffer b)
    • blockingRead

      public static ByteBuffer blockingRead(SocketChannel so, long timeout, int bytes) throws IOException
      Throws:
      IOException
    • blockingRead

      public static ByteBuffer blockingRead(SocketChannel so, long timeout, byte[] bytes) throws IOException
      Throws:
      IOException