This page, and any PDF documents linked on this page, are no longer maintained and may not meet accessibility standards. To request an accessible version of any content, please contact us.
org.apache.xmlrpc.util
Class LimitedInputStream
java.lang.Object
java.io.InputStream
org.apache.xmlrpc.util.LimitedInputStream
All Implemented Interfaces: java.io.Closeable
public class LimitedInputStream extends java.io.InputStream
A filtering InputStream for proper handling of
the Content-Length header: It guarantees to return
at most a given number of bytes.
Constructor Summary
LimitedInputStream (java.io.InputStream pIn,
int pAvailable)
Creates a new instance, reading from the given input stream
and returning at most the given number of bytes.
Methods inherited from class java.io.InputStream
available, close, read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
LimitedInputStream
public LimitedInputStream (java.io.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.
read
public int read ()
throws java.io.IOException
Specified by: read in class java.io.InputStream
Throws:
java.io.IOException
read
public int read (byte[] b,
int off,
int len)
throws java.io.IOException
Overrides: read in class java.io.InputStream
Throws:
java.io.IOException
skip
public long skip (long n)
throws java.io.IOException
Overrides: skip in class java.io.InputStream
Throws:
java.io.IOException
mark
public void mark (int readlimit)
Overrides: mark in class java.io.InputStream
reset
public void reset ()
throws java.io.IOException
Overrides: reset in class java.io.InputStream
Throws:
java.io.IOException
markSupported
public boolean markSupported ()
Overrides: markSupported in class java.io.InputStream
Copyright © 2001-2010 The Apache Software Foundation . All Rights Reserved.