org.mmbase.util
Class MockInputStream
java.lang.Object
java.io.InputStream
org.mmbase.util.MockInputStream
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- NullInputStream, RandomInputStream
public abstract class MockInputStream
- extends InputStream
- Since:
- MMBase-1.9.2
- Version:
- $Id: MockInputStream.java 41055 2010-02-15 23:59:16Z michiel $
- Author:
- Michiel Meeuwissen
|
Field Summary |
protected boolean |
closed
|
|
Method Summary |
int |
available()
|
void |
close()
|
protected abstract void |
fillArray(byte[] data,
int offset,
int l)
|
protected abstract int |
oneByte()
|
int |
read()
|
int |
read(byte[] data,
int offset,
int l)
|
long |
skip(long bytesToSkip)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
closed
protected boolean closed
MockInputStream
public MockInputStream(int l)
oneByte
protected abstract int oneByte()
fillArray
protected abstract void fillArray(byte[] data,
int offset,
int l)
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] data,
int offset,
int l)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
skip
public long skip(long bytesToSkip)
throws IOException
- Overrides:
skip in class InputStream
- Throws:
IOException
close
public void close()
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
available
public int available()
- Overrides:
available in class InputStream
MMBase 2.0-SNAPSHOT - null