Package org.apache.bookkeeper.streaming
Class LedgerInputStream
java.lang.Object
java.io.InputStream
org.apache.bookkeeper.streaming.LedgerInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
An input stream on reading data from a ledger.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[](package private) int(package private) int(package private) long(package private) Enumeration<LedgerEntry> -
Constructor Summary
ConstructorsConstructorDescriptionconstruct a outputstream from a ledger handle.LedgerInputStream(LedgerHandle lh, int size) construct a outputstream from a ledger handle. -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
bbytes
byte[] bbytes -
lastEntry
long lastEntry -
increment
int increment -
defaultSize
int defaultSize -
ledgerSeq
Enumeration<LedgerEntry> ledgerSeq
-
-
Constructor Details
-
LedgerInputStream
construct a outputstream from a ledger handle.- Parameters:
lh- ledger handle- Throws:
BKException- when encountered bookkeeper exceptionsInterruptedException- when opening a ledger input stream is interrupted.
-
LedgerInputStream
construct a outputstream from a ledger handle.- Parameters:
lh- the ledger handlesize- the size of the buffer- Throws:
BKException- when encountered bookkeeper exceptionsInterruptedException- when opening a ledger input stream is interrupted.
-
-
Method Details
-
close
public void close()Method close currently doesn't do anything. The application is supposed to open and close the ledger handle backing up a stream (LedgerHandle).- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-