Package net.i2p.data

Class ByteArray

    • Constructor Detail

      • ByteArray

        public ByteArray()
      • ByteArray

        public ByteArray​(byte[] data)
        Sets valid = data.length, unless data is null Sets offset = 0
        Parameters:
        data - may be null
      • ByteArray

        public ByteArray​(byte[] data,
                         int offset,
                         int length)
        Sets offset = offset Sets valid = length
        Parameters:
        data - may be null but why would you do that
    • Method Detail

      • getData

        public byte[] getData()
      • setData

        public void setData​(byte[] data)
        Warning, does not set valid
      • getValid

        public int getValid()
        Count how many of the bytes in the array are 'valid'. this property does not necessarily have meaning for all byte arrays.
      • setValid

        public void setValid​(int valid)
      • getOffset

        public int getOffset()
      • setOffset

        public void setOffset​(int offset)
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • toBase64

        public final String toBase64()