|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.jackrabbit.core.data.db.DbInputStream
public class DbInputStream
This class represents an input stream backed by a database. It allows the stream to be used by keeping the database objects open until the stream is closed. When the stream is finished or closed, then the database objects are freed.
| Field Summary | |
|---|---|
protected ConnectionRecoveryManager |
conn
|
protected boolean |
endOfStream
|
protected DataIdentifier |
identifier
|
protected InputStream |
in
|
protected ResultSet |
rs
|
protected DbDataStore |
store
|
| 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DbDataStore store
protected DataIdentifier identifier
protected boolean endOfStream
protected InputStream in
protected ConnectionRecoveryManager conn
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 InputStreamIOException
public int read(byte[] b)
throws IOException
read in class InputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
public long skip(long n)
throws IOException
skip in class InputStreamIOException
public int available()
throws IOException
available in class InputStreamIOExceptionpublic void mark(int readlimit)
mark in class InputStream
public void reset()
throws IOException
reset in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||