|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
org.apache.commons.io.input.AutoCloseInputStream
org.apache.jackrabbit.core.data.db.DbInputStream
public class DbInputStream
This class represents an input stream backed by a database. The database objects are only acquired when reading from the stream, and stay open until the stream is closed, fully read, or garbage collected.
This class does not support mark/reset. It is always to be wrapped using a BufferedInputStream.
| Field Summary | |
|---|---|
protected boolean |
endOfStream
|
protected DataIdentifier |
identifier
|
protected ResultSet |
rs
|
protected DbDataStore |
store
|
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
protected |
DbInputStream(DbDataStore store,
DataIdentifier identifier)
Create a database input stream for the given identifier. |
| Method Summary | |
|---|---|
int |
available()
|
void |
close()
When the stream is consumed, the database objects held by the instance are closed. |
void |
mark(int readlimit)
This method does nothing. |
boolean |
markSupported()
Check whether mark and reset are supported. |
protected void |
openStream()
Open the stream if required. |
int |
read()
When the stream is consumed, the database objects held by the instance are closed. |
int |
read(byte[] b)
When the stream is consumed, the database objects held by the instance are closed. |
int |
read(byte[] b,
int off,
int len)
When the stream is consumed, the database objects held by the instance are closed. |
void |
reset()
This method does nothing. |
long |
skip(long n)
|
| Methods inherited from class org.apache.commons.io.input.AutoCloseInputStream |
|---|
afterRead, finalize |
| Methods inherited from class org.apache.commons.io.input.ProxyInputStream |
|---|
beforeRead, handleIOException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DbDataStore store
protected DataIdentifier identifier
protected boolean endOfStream
protected ResultSet rs
| Constructor Detail |
|---|
protected DbInputStream(DbDataStore store,
DataIdentifier identifier)
store - the database data storeidentifier - the data identifier| Method Detail |
|---|
protected void openStream()
throws IOException
IOException
public int read()
throws IOException
read in class org.apache.commons.io.input.ProxyInputStreamIOException
public int read(byte[] b)
throws IOException
read in class org.apache.commons.io.input.ProxyInputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class org.apache.commons.io.input.ProxyInputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class org.apache.commons.io.input.AutoCloseInputStreamIOException
public long skip(long n)
throws IOException
skip in class org.apache.commons.io.input.ProxyInputStreamIOException
public int available()
throws IOException
available in class org.apache.commons.io.input.ProxyInputStreamIOExceptionpublic void mark(int readlimit)
mark in class org.apache.commons.io.input.ProxyInputStream
public void reset()
throws IOException
reset in class org.apache.commons.io.input.ProxyInputStreamIOExceptionpublic boolean markSupported()
markSupported in class org.apache.commons.io.input.ProxyInputStream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||