Class NullOutputByteStream

  • All Implemented Interfaces:
    OutputByteStream

    public class NullOutputByteStream
    extends Object
    Only for internal engineering use. This api can change without notice.
    • Constructor Detail

      • NullOutputByteStream

        public NullOutputByteStream()
        Only for internal engineering use. This api can change without notice.
    • Method Detail

      • write

        public void write​(byte[] bytes,
                          int offset,
                          int length)
                   throws IOException
        Description copied from interface: OutputByteStream
        Only for internal engineering use. This api can change without notice. Write an array of bytes starting at the current position. The position is incremented by the length of the array that has been written.
        Specified by:
        write in interface OutputByteStream
        Parameters:
        bytes - The source array.
        offset - The offset in the byte array to begin writing from.
        length - The number of bytes to write.
        Throws:
        IOException
      • length

        public long length()
                    throws IOException
        Description copied from interface: OutputByteStream
        Only for internal engineering use. This api can change without notice. The number of bytes that can exist in this OutputByteStream.
        Returns:
        Total number of bytes available in this OutputByteStream.
        Throws:
        IOException
      • close

        public void close()
                   throws IOException
        Description copied from interface: OutputByteStream
        Only for internal engineering use. This api can change without notice.
        Throws:
        IOException
      • flush

        public void flush()
                   throws IOException
        Description copied from interface: OutputByteStream
        Only for internal engineering use. This api can change without notice.
        Throws:
        IOException
      • write

        public void write​(byte[] bytes)
                   throws IOException
        Description copied from interface: OutputByteStream
        Only for internal engineering use. This api can change without notice. Write an array of bytes starting at the current position. The position is incremented by the length of the array that has been written.
        Specified by:
        write in interface OutputByteStream
        Parameters:
        bytes - The source array.
        Throws:
        IOException
      • seek

        public OutputByteStream seek​(long position)
                              throws IOException
        Only for internal engineering use. This api can change without notice. Set the current position in the underlying data.
        Specified by:
        seek in interface OutputByteStream
        Parameters:
        position - Where to set the current position.
        Returns:
        This object.
        Throws:
        IOException
      • eof

        public boolean eof()
                    throws IOException
        Description copied from interface: OutputByteStream
        Only for internal engineering use. This api can change without notice. Is the current position of this OutputByteStream at or beyond the end of the underlying data.
        Specified by:
        eof in interface OutputByteStream
        Returns:
        True if the current position is beyond the end of the underlying data, false otherwise.
        Throws:
        IOException
      • toOutputStream

        public SkippingOutputStream toOutputStream()
                                            throws IOException
        Description copied from interface: OutputByteStream
        This will return a new OutputStream that wraps the same bytes as the OutputByteStream. Writing to or positioning either one will affect the other. This OutputStream may be safely closed without that causing the OutputByteStream to be closed. This is commonly used for external libraries that need an OutputStream. Do NOT use it to pass data around internally as this will generally be inefficient and cause conversion and memory usage.
        Specified by:
        toOutputStream in interface OutputByteStream
        Returns:
        an OutputStream that wraps the same bytes
        Throws:
        IOException