org.hudsonci.utils.io
Class OffsetLimitInputStream
java.lang.Object
java.io.InputStream
org.hudsonci.utils.io.OffsetLimitInputStream
- All Implemented Interfaces:
- Closeable
public class OffsetLimitInputStream
- extends InputStream
Provides read-offset and read-limit for an underlying input-stream.
- Since:
- 2.1.0
- Author:
- Jason Dillon
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNLIMITED
public static final int UNLIMITED
- See Also:
- Constant Field Values
OffsetLimitInputStream
public OffsetLimitInputStream(InputStream delegate,
long offset,
long length)
throws IOException
- Throws:
IOException
getDelegate
public InputStream getDelegate()
getOffset
public long getOffset()
getLength
public long getLength()
getCount
public long getCount()
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
- Throws:
IOException
mark
public void mark(int readlimit)
- Overrides:
mark in class InputStream
reset
public void reset()
throws IOException
- Overrides:
reset in class InputStream
- Throws:
IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported in class InputStream
Copyright © 2004-2012 Hudson. All Rights Reserved.