com.wizzardo.tools.io
Class BlockInputStream
java.lang.Object
java.io.InputStream
com.wizzardo.tools.io.BlockInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class BlockInputStream
- 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 |
BlockInputStream
public BlockInputStream(java.io.InputStream in,
byte[] separator)
BlockInputStream
public BlockInputStream(java.io.InputStream in,
byte[] separator,
long limit)
BlockInputStream
public BlockInputStream(java.io.InputStream in,
byte[] separator,
long limit,
ProgressListener progressListener)
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Throws:
java.io.IOException
hasNext
public boolean hasNext()
throws java.io.IOException
- Throws:
java.io.IOException
next
public void next()
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
read
public int read(byte[] b,
int off,
int l)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
getBlockLength
public long getBlockLength()
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
isEnding
public static int isEnding(byte[] b,
int length,
byte[] endsWith)
ready
public boolean ready()
throws java.io.IOException
- Throws:
java.io.IOException