Class UnsafeOutput

    • Constructor Detail

      • UnsafeOutput

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

        public UnsafeOutput​(int bufferSize,
                            int maxBufferSize)
        Creates a new Output for writing to a byte[].
        Parameters:
        bufferSize - The initial size of the buffer.
        maxBufferSize - If Output.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.
      • UnsafeOutput

        public UnsafeOutput​(byte[] buffer)
        Creates a new Output for writing to a byte[].
        See Also:
        Output.setBuffer(byte[])
      • UnsafeOutput

        public UnsafeOutput​(byte[] buffer,
                            int maxBufferSize)
        Creates a new Output for writing to a byte[].
        See Also:
        Output.setBuffer(byte[], int)
      • UnsafeOutput

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

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