Class ByteBufferWriteOutBytes

    • Method Detail

      • size

        public long size()
        Description copied from class: WriteOutBytes
        Returns the number of bytes written to this WriteOutBytes so far.
        Specified by:
        size in class WriteOutBytes
      • allocateBuffer

        protected abstract ByteBuffer allocateBuffer()
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
        Overrides:
        write in class OutputStream
      • writeTo

        public void writeTo​(ByteBuffer out)
        Takes all bytes that are written to this WriteOutBytes so far and writes them into the given ByteBuffer. This method changes the position of the out buffer by the size() of this WriteOutBytes.
        Throws:
        BufferOverflowException - if the Buffer.remaining() capacity of the given buffer is smaller than the size of this WriteOutBytes
      • readFully

        public void readFully​(long pos,
                              ByteBuffer buffer)
        Description copied from class: WriteOutBytes
        Reads bytes from the byte sequences, represented by this WriteOutBytes, at the random position, into the given buffer.
        Specified by:
        readFully in class WriteOutBytes
      • isOpen

        public boolean isOpen()
      • free

        public void free()