de.undercouch.bson4jackson.io
Class StaticBufferedInputStream
java.lang.Object
java.io.InputStream
de.undercouch.bson4jackson.io.StaticBufferedInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class StaticBufferedInputStream
- extends java.io.InputStream
Works like BufferedInputStream, but is not thread-safe and
also uses a a re-usable static buffer provided by StaticBuffers to
achieve better performance
| Methods inherited from class java.io.InputStream |
available, read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticBufferedInputStream
public StaticBufferedInputStream(java.io.InputStream in)
- Creates a new buffered input stream
- Parameters:
in - the original unbuffered input stream
StaticBufferedInputStream
public StaticBufferedInputStream(java.io.InputStream in,
int size)
- Creates a new buffered input stream
- Parameters:
in - the original unbuffered input streamsize - the minimum buffer size
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
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,
int off,
int len)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Overrides:
skip in class java.io.InputStream
- Throws:
java.io.IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported in class java.io.InputStream
mark
public void mark(int marklimit)
- Overrides:
mark in class java.io.InputStream
reset
public void reset()
throws java.io.IOException
- Overrides:
reset in class java.io.InputStream
- Throws:
java.io.IOException