|
||||||||||
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.
Field Summary | |
---|---|
protected ConnectionRecoveryManager |
conn
|
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)
|
boolean |
markSupported()
|
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()
|
long |
skip(long n)
|
Methods inherited from class org.apache.commons.io.input.AutoCloseInputStream |
---|
finalize |
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 ConnectionRecoveryManager conn
protected ResultSet rs
Constructor Detail |
---|
protected DbInputStream(DbDataStore store, DataIdentifier identifier)
store
- the database data storeidentifier
- the data identifierMethod Detail |
---|
protected void openStream() throws IOException
IOException
public int read() throws IOException
read
in class org.apache.commons.io.input.AutoCloseInputStream
IOException
public int read(byte[] b) throws IOException
read
in class org.apache.commons.io.input.AutoCloseInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class org.apache.commons.io.input.AutoCloseInputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class org.apache.commons.io.input.AutoCloseInputStream
IOException
public long skip(long n) throws IOException
skip
in class org.apache.commons.io.input.ProxyInputStream
IOException
public int available() throws IOException
available
in class org.apache.commons.io.input.ProxyInputStream
IOException
public 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.ProxyInputStream
IOException
public 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 |