|
||||||||||
| 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 java.io.InputStream |
in
|
protected java.sql.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 java.io.InputStream in
protected ConnectionRecoveryManager conn
protected java.sql.ResultSet rs
| Constructor Detail |
|---|
protected DbInputStream(DbDataStore store,
DataIdentifier identifier)
store - the database data storeidentifier - the data identifier| Method Detail |
|---|
protected void openStream()
throws java.io.IOException
java.io.IOException
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOException
public long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOException
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class java.io.InputStream
public void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||