org.apache.xmlrpc.util

Class LimitedInputStream

public class LimitedInputStream extends InputStream

A filtering {@link java.io.InputStream} for proper handling of the Content-Length header: It guarantees to return at most a given number of bytes.
Constructor Summary
LimitedInputStream(InputStream pIn, int pAvailable)
Creates a new instance, reading from the given input stream and returning at most the given number of bytes.
Method Summary
voidmark(int readlimit)
booleanmarkSupported()
intread()
intread(byte[] b, int off, int len)
voidreset()
longskip(long n)

Constructor Detail

LimitedInputStream

public LimitedInputStream(InputStream pIn, int pAvailable)
Creates a new instance, reading from the given input stream and returning at most the given number of bytes.

Parameters: pIn Input stream being read. pAvailable Number of bytes available in pIn.

Method Detail

mark

public void mark(int readlimit)

markSupported

public boolean markSupported()

read

public int read()

read

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

reset

public void reset()

skip

public long skip(long n)
Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.