Class UnsafeByteBufferOutput

    • Constructor Detail

      • UnsafeByteBufferOutput

        public UnsafeByteBufferOutput​(int bufferSize)
        Creates a new Output for writing to a direct ByteBuffer.
        Parameters:
        bufferSize - The size of the buffer. An exception is thrown if more bytes than this are written and ByteBufferOutput.flush() does not empty the buffer.
      • UnsafeByteBufferOutput

        public UnsafeByteBufferOutput​(int bufferSize,
                                      int maxBufferSize)
        Creates a new Output for writing to a direct ByteBuffer.
        Parameters:
        bufferSize - The initial size of the buffer.
        maxBufferSize - If ByteBufferOutput.flush() does not empty the buffer, the buffer is doubled as needed until it exceeds maxBufferSize and an exception is thrown. Can be -1 for no maximum.
      • UnsafeByteBufferOutput

        public UnsafeByteBufferOutput​(OutputStream outputStream)
        Creates a new Output for writing to an OutputStream. A buffer size of 4096 is used.
      • UnsafeByteBufferOutput

        public UnsafeByteBufferOutput​(OutputStream outputStream,
                                      int bufferSize)
        Creates a new Output for writing to an OutputStream with the specified buffer size.
      • UnsafeByteBufferOutput

        public UnsafeByteBufferOutput​(long address,
                                      int size)
        Creates a new Output for writing to a ByteBuffer representing the memory region at the specified address and size. @throws UnsupportedOperationException if creating a ByteBuffer this way is not available.