Class BoundedInputStream

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

    @Deprecated
    public class BoundedInputStream
    extends org.apache.commons.io.input.BoundedInputStream
    Deprecated.
    Use BoundedInputStream.
    A stream that limits reading from a wrapped stream to a given number of bytes.
    Since:
    1.6
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      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.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      long getBytesRemaining()
      Deprecated.
      Gets how many bytes remain to read.
      • Methods inherited from class org.apache.commons.io.input.BoundedInputStream

        available, close, getCount, getMaxLength, isPropagateClose, mark, markSupported, onMaxLength, read, read, read, reset, setPropagateClose, skip, toString
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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.
        Returns:
        bytes how many bytes remain to read.
        Since:
        1.21