com.wizzardo.tools.io
Class SizedBlockInputStream
java.lang.Object
java.io.InputStream
com.wizzardo.tools.io.SizedBlockInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class SizedBlockInputStream
- extends java.io.InputStream
| Methods inherited from class java.io.InputStream |
available, mark, markSupported, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected java.io.InputStream in
blockLength
protected long blockLength
readed
protected long readed
listener
protected ProgressListener listener
sizeType
protected BlockSizeType sizeType
SizedBlockInputStream
public SizedBlockInputStream(java.io.InputStream in)
SizedBlockInputStream
public SizedBlockInputStream(java.io.InputStream in,
BlockSizeType sizeType)
hasNext
public boolean hasNext()
throws java.io.IOException
- Throws:
java.io.IOException
setListener
public void setListener(ProgressListener listener)
lenght
public long lenght()
read
public int read(byte[] b,
int offset,
int l)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
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)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.InputStream
- Throws:
java.io.IOException