org.sblim.cimclient.internal.http.io

Class BoundedInputStream

public class BoundedInputStream extends FilterInputStream

Class BoundedInputStream implements an input stream with a maximum byte count.
Constructor Summary
BoundedInputStream(InputStream pStream)
Ctor.
BoundedInputStream(InputStream pStream, long pMaximumLength)
Ctor.
Method Summary
intavailable()
voidclose()
intread()
intread(byte[] buf)
intread(byte[] buf, int off, int len)
longskip(long len)

Constructor Detail

BoundedInputStream

public BoundedInputStream(InputStream pStream)
Ctor. Creates the stream with unlimited length.

Parameters: pStream The stream this one is build upon

BoundedInputStream

public BoundedInputStream(InputStream pStream, long pMaximumLength)
Ctor.

Parameters: pStream The stream this one is build upon pMaximumLength The maximum number of bytes that can be read from this stream. A value of -1 represents unlimimted mode.

Method Detail

available

public int available()

close

public void close()

read

public int read()

read

public int read(byte[] buf)

read

public int read(byte[] buf, int off, int len)

skip

public long skip(long len)
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.