Class ChunkedOutputStream

    • Constructor Detail

      • ChunkedOutputStream

        public ChunkedOutputStream​(PrintStream o)
      • ChunkedOutputStream

        public ChunkedOutputStream​(PrintStream o,
                                   int size)
    • Method Detail

      • checkError

        public boolean checkError()
        Description copied from class: PrintStream
        Flushes the stream and checks its error state. The internal error state is set to true when the underlying output stream throws an IOException other than InterruptedIOException, and when the setError method is invoked. If an operation on the underlying output stream throws an InterruptedIOException, then the PrintStream converts the exception back into an interrupt by doing:
         Thread.currentThread().interrupt();
         
        or the equivalent.
        Overrides:
        checkError in class PrintStream
        Returns:
        true if and only if this stream has encountered an IOException other than InterruptedIOException, or the setError method has been invoked
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
        Description copied from class: PrintStream
        Writes len bytes from the specified byte array starting at offset off to this stream. If automatic flushing is enabled then the flush method will be invoked.

        Note that the bytes will be written as given; to write characters that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods.

        Overrides:
        write in class PrintStream
        Parameters:
        b - A byte array
        off - Offset from which to start taking bytes
        len - Number of bytes to write
        See Also:
        FilterOutputStream.write(int)
      • write

        public void write​(int _b)
        Description copied from class: PrintStream
        Writes the specified byte to this stream. If the byte is a newline and automatic flushing is enabled then the flush method will be invoked.

        Note that the byte is written as given; to write a character that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods.

        Overrides:
        write in class PrintStream
        Parameters:
        _b - The byte to be written
        See Also:
        PrintStream.print(char), PrintStream.println(char)
      • reset

        public void reset()
      • size

        public int size()
      • flush

        public void flush()
        Description copied from class: PrintStream
        Flushes the stream. This is done by writing any buffered output bytes to the underlying output stream and then flushing that stream.
        Specified by:
        flush in interface Flushable
        Overrides:
        flush in class PrintStream
        See Also:
        OutputStream.flush()