Class ByteBufferStream


  • @Deprecated
    public class ByteBufferStream
    extends Object
    Deprecated.
    NIO is block-oriented IO. In case you need stream-oriented IO, use ByteArrayOutputStream.
    Implements a bytes stream using ByteBuffers
    • Constructor Detail

      • ByteBufferStream

        public ByteBufferStream​(int size)
        Deprecated.
        Allocate buffer with specified initial size.
      • ByteBufferStream

        public ByteBufferStream()
        Deprecated.
        Allocate buffer with default size 1kb.
    • Method Detail

      • getBuffer

        public byte[] getBuffer()
        Deprecated.
        Returns:
        the buffer
      • putLong

        public ByteBufferStream putLong​(long value)
        Deprecated.
        Put long
      • put

        public ByteBufferStream put​(byte[] value)
        Deprecated.
        Put all bytes to stream.
      • put

        public ByteBufferStream put​(byte[] value,
                                    int offset,
                                    int len)
        Deprecated.
        Put all bytes to stream.
      • clear

        public void clear()
        Deprecated.
        Clears the stream.
      • startBlock

        public void startBlock()
        Deprecated.
        Starts block.
      • endBlock

        public void endBlock()
        Deprecated.
        Ends block.