Class DbInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.commons.io.input.ProxyInputStream
-
- org.apache.commons.io.input.AutoCloseInputStream
-
- org.apache.jackrabbit.core.data.db.DbInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class DbInputStream extends AutoCloseInputStream
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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()When the stream is consumed, the database objects held by the instance are closed.voidmark(int readlimit)This method does nothing.booleanmarkSupported()Check whether mark and reset are supported.intread()When the stream is consumed, the database objects held by the instance are closed.intread(byte[] b)When the stream is consumed, the database objects held by the instance are closed.intread(byte[] b, int off, int len)When the stream is consumed, the database objects held by the instance are closed.voidreset()This method does nothing.longskip(long n)
-
-
-
Method Detail
-
read
public int read() throws java.io.IOExceptionWhen the stream is consumed, the database objects held by the instance are closed.- Overrides:
readin classProxyInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOExceptionWhen the stream is consumed, the database objects held by the instance are closed.- Overrides:
readin classProxyInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOExceptionWhen the stream is consumed, the database objects held by the instance are closed.- Overrides:
readin classProxyInputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionWhen the stream is consumed, the database objects held by the instance are closed.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classAutoCloseInputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classProxyInputStream- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException- Overrides:
availablein classProxyInputStream- Throws:
java.io.IOException
-
mark
public void mark(int readlimit)
This method does nothing.- Overrides:
markin classProxyInputStream
-
reset
public void reset() throws java.io.IOExceptionThis method does nothing.- Overrides:
resetin classProxyInputStream- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
Check whether mark and reset are supported.- Overrides:
markSupportedin classProxyInputStream- Returns:
- false
-
-