org.restlet.engine.io
Class RangeInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.restlet.engine.io.RangeInputStream
- All Implemented Interfaces:
- Closeable
public class RangeInputStream
- extends FilterInputStream
Filters an input stream to expose only a given range.
- Author:
- Jerome Louvel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RangeInputStream
public RangeInputStream(InputStream in,
long totalSize,
Range range)
- Constructs a stream exposing only a range of a given source stream.
- Parameters:
in
- The source input stream.totalSize
- The total size of the source stream.range
- The range to satisfy.
available
public int available()
throws IOException
- Overrides:
available
in class FilterInputStream
- Throws:
IOException
mark
public void mark(int readlimit)
- Overrides:
mark
in class FilterInputStream
read
public int read()
throws IOException
- Overrides:
read
in class FilterInputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class FilterInputStream
- Throws:
IOException
Copyright © 2005-2013 Restlet.