Package gnu.lists

Class ByteVector<E>

    • Field Detail

      • empty

        protected static byte[] empty
    • Constructor Detail

      • ByteVector

        public ByteVector()
    • Method Detail

      • getBufferLength

        public int getBufferLength()
        Get the allocated length of the data buffer.
        Specified by:
        getBufferLength in class SimpleVector<E>
      • setBuffer

        protected void setBuffer​(java.lang.Object buffer)
        Specified by:
        setBuffer in class SimpleVector<E>
      • getByte

        public final byte getByte​(int index)
      • setByte

        public final void setByte​(int index,
                                  byte value)
      • setByteRaw

        public final void setByteRaw​(int index,
                                     byte value)
      • add

        public void add​(byte v)
      • clearBuffer

        protected void clearBuffer​(int start,
                                   int count)
        Specified by:
        clearBuffer in class SimpleVector<E>
      • readFrom

        public int readFrom​(int start,
                            int count,
                            java.io.InputStream in)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • writeTo

        public void writeTo​(java.io.OutputStream out)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • writeTo

        public void writeTo​(int start,
                            int count,
                            java.io.OutputStream out)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • copyFrom

        public void copyFrom​(int index,
                             ByteVector src,
                             int start,
                             int end)
      • getInputStream

        public java.io.InputStream getInputStream()
      • utf8ToString

        public java.lang.String utf8ToString​(int start,
                                             int length)
        Covert bytes, interpreted as UTF-8 characters, to a String.
      • utf16ToString

        public java.lang.String utf16ToString​(int start,
                                              int length)
      • utf16ToString

        public java.lang.String utf16ToString​(int start,
                                              int length,
                                              boolean bigEndian)