Class BinaryWriter

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class BinaryWriter
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Field Detail

      • os

        private final java.io.ByteArrayOutputStream os
    • Constructor Detail

      • BinaryWriter

        public BinaryWriter()
    • Method Detail

      • writeUnsignedLeb128

        private static int writeUnsignedLeb128​(int value,
                                               java.io.OutputStream os)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • writeSignedLeb128

        private static int writeSignedLeb128​(int value,
                                             java.io.OutputStream os)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • writeSignedLeb128

        private static int writeSignedLeb128​(long value,
                                             java.io.OutputStream os)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • toByteArray

        public byte[] toByteArray()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException
      • header

        public void header()
                    throws java.io.IOException
        Throws:
        java.io.IOException