org.mmbase.util
Class MockInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by 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
           
 
Constructor Summary
MockInputStream(int l)
           
 
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.io.InputStream
mark, markSupported, read, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

closed

protected boolean closed
Constructor Detail

MockInputStream

public MockInputStream(int l)
Method Detail

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