Class HBinaryIO


  • public final class HBinaryIO
    extends Object
    • Method Detail

      • checkMagicAndGetVersion

        public static int checkMagicAndGetVersion​(InputStream input,
                                                  byte[] magic)
      • copy

        public static void copy​(InputStream input,
                                OutputStream output)
                         throws IOException
        Copy an input stream to an output stream.
        Parameters:
        input - The input stream to read from.
        output - The output stream to write to.
        Throws:
        IOException - IOException if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.
      • isEqual

        public static boolean isEqual​(InputStream... streams)
      • read

        public static byte[] read​(InputStream input)
      • read

        public static byte[] read​(InputStream input,
                                  int length)
      • readByte

        public static byte readByte​(InputStream input)
      • readInt

        public static int readInt​(InputStream input)
      • write

        public static <T extends OutputStream> T write​(T output,
                                                       byte[] data)
      • write

        public static <T extends OutputStream> T write​(T output,
                                                       int value)