Class LimitedByteOutput

    • Constructor Detail

      • LimitedByteOutput

        public LimitedByteOutput​(ByteOutput byteOutput,
                                 long limit)
        Construct a new instance.
        Parameters:
        byteOutput - the byte output to write to
        limit - the byte limit
    • Method Detail

      • write

        public void write​(int b)
                   throws IOException
        Writes to the output stream the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.
        Specified by:
        write in interface ByteOutput
        Overrides:
        write in class ByteOutputStream
        Parameters:
        b - the byte to write
        Throws:
        IOException - if an error occurs
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws IOException
        Write some of the bytes from the given array to the stream.
        Specified by:
        write in interface ByteOutput
        Overrides:
        write in class ByteOutputStream
        Parameters:
        b - the byte array
        off - the index to start writing from
        len - the number of bytes to write
        Throws:
        IOException - if an error occurs