public class DbInputStream extends AutoCloseInputStream
This class does not support mark/reset. It is always to be wrapped using a BufferedInputStream.
Modifier and Type | Method and Description |
---|---|
int |
available()
Invokes the delegate's
available() method. |
void |
close()
Closes the underlying input stream and replaces the reference to it
with a
ClosedInputStream instance. |
void |
mark(int readlimit)
This method does nothing.
|
boolean |
markSupported()
Check whether mark and reset are supported.
|
int |
read()
Invokes the delegate's
read() method. |
int |
read(byte[] b)
Invokes the delegate's
read(byte[]) method. |
int |
read(byte[] b,
int off,
int len)
Invokes the delegate's
read(byte[], int, int) method. |
void |
reset()
This method does nothing.
|
long |
skip(long n)
Invokes the delegate's
skip(long) method. |
public int read() throws java.io.IOException
read()
method.
When the stream is consumed, the database objects held by the instance are closed.read
in class ProxyInputStream
java.io.IOException
- if an I/O error occurspublic int read(byte[] b) throws java.io.IOException
read(byte[])
method.
When the stream is consumed, the database objects held by the instance are closed.read
in class ProxyInputStream
b
- the buffer to read the bytes intojava.io.IOException
- if an I/O error occurspublic int read(byte[] b, int off, int len) throws java.io.IOException
read(byte[], int, int)
method.
When the stream is consumed, the database objects held by the instance are closed.read
in class ProxyInputStream
b
- the buffer to read the bytes intooff
- The start offsetlen
- The number of bytes to readjava.io.IOException
- if an I/O error occurspublic void close() throws java.io.IOException
ClosedInputStream
instance.
This method is automatically called by the read methods when the end of input has been reached.
Note that it is safe to call this method any number of times. The original underlying input stream is closed and discarded only once when this method is first called. When the stream is consumed, the database objects held by the instance are closed.
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class AutoCloseInputStream
java.io.IOException
- if the underlying input stream can not be closedpublic long skip(long n) throws java.io.IOException
skip(long)
method.skip
in class ProxyInputStream
n
- the number of bytes to skipjava.io.IOException
- if an I/O error occurspublic int available() throws java.io.IOException
available()
method.available
in class ProxyInputStream
java.io.IOException
- if an I/O error occurspublic void mark(int readlimit)
mark
in class ProxyInputStream
readlimit
- read ahead limitpublic void reset() throws java.io.IOException
reset
in class ProxyInputStream
java.io.IOException
- if an I/O error occurspublic boolean markSupported()
markSupported
in class ProxyInputStream
Copyright © 2010 - 2020 Adobe. All Rights Reserved