Class ByteArrayOutputWrapper

    • Constructor Detail

      • ByteArrayOutputWrapper

        public ByteArrayOutputWrapper​(int bufferSize)
      • ByteArrayOutputWrapper

        public ByteArrayOutputWrapper()
    • Method Detail

      • writeU32

        public void writeU32​(int value)
        Writes a unsigned 32bit integer varint encoded to the underlying Stream.
        Parameters:
        value - 32bit integer to encode.
      • writeS32

        public void writeS32​(int value)
        Writes a signed 32bit integer varint encoded to the underlying Stream.
        Parameters:
        value - 32bit integer to encode.
      • writeS32Delta

        public int writeS32Delta​(int value,
                                 int last)
      • writeU64

        public void writeU64​(long value)
        Writes a unsigned 64bit integer varint encoded to the underlying Stream.
        Parameters:
        value - 64bit integer to encode.
      • writeU64Delta

        public long writeU64Delta​(long value,
                                  long last)
        Write a delta encoded unsigned 64 bit value to the stream.
        Parameters:
        value - current value
        last - last value or delta encoding
        Returns:
        current value
      • writeS64

        public void writeS64​(long value)
        Writes a signed 64bit integer varint encoded to the underlying Stream.
        Parameters:
        value - 64bit integer to encode.
      • writeS64Delta

        public long writeS64Delta​(long value,
                                  long last)
        Write a delta encoded signed 64 bit value to the stream.
        Parameters:
        value - current value
        last - last value or delta encoding
        Returns:
        current value
      • writeByte

        public void writeByte​(int value)
      • writeByteArray

        public void writeByteArray​(byte[] value,
                                   int offset,
                                   int length)
      • reset

        public void reset()
      • length

        public int length()
      • array

        public byte[] array()