Class BoundedInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    @Deprecated
    public class BoundedInputStream
    extends BoundedInputStream
    Deprecated.
    A stream that limits reading from a wrapped stream to a given number of bytes.
    Since:
    1.6
    • Constructor Detail

      • BoundedInputStream

        public BoundedInputStream​(java.io.InputStream in,
                                  long size)
        Deprecated.
        Creates the stream that will at most read the given amount of bytes from the given stream.
        Parameters:
        in - the stream to read from
        size - the maximum amount of bytes to read
    • Method Detail

      • getBytesRemaining

        public long getBytesRemaining()
        Deprecated.
        Gets how many bytes remain to read. TODO Use Apache Commons IO 2.16.0 org.apache.commons.io.input.BoundedInputStream.getRemaining() when released.
        Returns:
        bytes how many bytes remain to read.
        Since:
        1.21