Class Utils

java.lang.Object
dev.zarr.zarrjava.utils.Utils

public class Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • allocateNative

      public static ByteBuffer allocateNative(int capacity)
    • makeByteBuffer

      public static ByteBuffer makeByteBuffer(int capacity, Function<ByteBuffer,ByteBuffer> func)
    • asByteBuffer

      public static ByteBuffer asByteBuffer(InputStream inputStream) throws IOException
      Throws:
      IOException
    • toLongArray

      public static long[] toLongArray(int[] array)
    • toIntArray

      public static int[] toIntArray(long[] array)
    • toArray

      public static byte[] toArray(ByteBuffer buffer)
    • asStream

      public static <T> Stream<T> asStream(Iterator<T> sourceIterator)
    • concatArrays

      public static <T> T[] concatArrays(T[] array1, T[]... arrays)
    • copyStream

      public static void copyStream(InputStream inputStream, OutputStream outputStream) throws IOException
      Throws:
      IOException
    • isPermutation

      public static boolean isPermutation(int[] array)
    • inversePermutation

      public static int[] inversePermutation(int[] origin)