Skip navigation links
oracle.stellent.ridc.common.io
Class LengthLimitedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
oracle.stellent.ridc.common.io.LengthLimitedInputStream
- All Implemented Interfaces:
- Closeable
-
public class LengthLimitedInputStream
- extends FilterInputStream
InputStream that will only read up to a given content length
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LengthLimitedInputStream
public LengthLimitedInputStream(InputStream is,
long length)
getContentLength
public long getContentLength()
read
public int read(byte[] b,
int off,
int len)
throws IOException
-
- Overrides:
read
in class FilterInputStream
-
- Throws:
IOException
read
public int read()
throws IOException
-
- Overrides:
read
in class FilterInputStream
-
- Throws:
IOException
available
public int available()
throws IOException
-
- Overrides:
available
in class FilterInputStream
-
- Throws:
IOException
skip
public long skip(long n)
throws IOException
-
- Overrides:
skip
in class FilterInputStream
-
- Throws:
IOException
mark
public void mark(int readlimit)
-
- Overrides:
mark
in class FilterInputStream
reset
public void reset()
throws IOException
-
- Overrides:
reset
in class FilterInputStream
-
- Throws:
IOException
Skip navigation links
Copyright © 2008, 2013, Oracle and/or its affiliates. All rights reserved.