Top Description Constructors Methods
org.apache.commons.compress.utils

public Class BoundedInputStream

extends BoundedInputStream
Class Inheritance
Annotations
@Deprecated
Imports
java.io.InputStream

Deprecated

Use org.apache.commons.io.input.BoundedInputStream.

A stream that limits reading from a wrapped stream to a given number of bytes.
Since
1.6

Constructor Summary

AccessConstructor and Description
public
BoundedInputStream(final InputStream
the stream to read from
in
,
final long
the maximum amount of bytes to read
size
)

Creates the stream that will at most read the given amount of bytes from the given stream.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

bytes how many bytes remain to read.
getBytesRemaining
()

Gets how many bytes remain to read.

Inherited from org.apache.commons.io.input.BoundedInputStream:
availableclosegetCountgetMaxLengthisPropagateClosemarkmarkSupportedonMaxLengthreadreadreadresetsetPropagateCloseskiptoString

Constructor Detail

BoundedInputStreamback to summary
public BoundedInputStream(final InputStream in, final long size)

Creates the stream that will at most read the given amount of bytes from the given stream.

Parameters
in:InputStream

the stream to read from

size:long

the maximum amount of bytes to read

Method Detail

getBytesRemainingback to summary
public long getBytesRemaining()

Gets how many bytes remain to read.

Returns:long

bytes how many bytes remain to read.

Since
1.21