|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jwat.warc.WarcReader
org.jwat.warc.WarcReaderUncompressed
public class WarcReaderUncompressed
WARC Reader implementation for reading uncompressed files.
| Field Summary | |
|---|---|
protected ByteCountingPushBackInputStream |
in
WARC file InputStream. |
static int |
PUSHBACK_BUFFER_SIZE
Buffer size used by PushbackInputStream. |
protected long |
startOffset
Start offset of current or next valid record. |
| Fields inherited from class org.jwat.warc.WarcReader |
|---|
bBlockDigest, bIsCompliant, blockDigestAlgorithm, blockDigestEncoding, bPayloadDigest, consumed, diagnostics, errors, fieldParser, headerLineReader, iteratorExceptionThrown, lineReader, payloadDigestAlgorithm, payloadDigestEncoding, payloadHeaderMaxSize, warcHeaderMaxSize, warcRecord, warnings |
| Method Summary | |
|---|---|
void |
close()
Close current record resource(s) and input stream(s). |
long |
getConsumed()
Get number of bytes consumed by this reader. |
WarcRecord |
getNextRecord()
Parses and gets the next record. |
WarcRecord |
getNextRecordFrom(InputStream rin,
long offset)
Parses and gets the next record from an Inputstream. |
WarcRecord |
getNextRecordFrom(InputStream rin,
long offset,
int buffer_size)
Parses and gets the next record from an Inputstream wrapped
by a BufferedInputStream. |
long |
getOffset()
Get the current offset in the WARC InputStream. |
long |
getStartOffset()
Get the offset of the current or next WARC record. |
boolean |
isCompressed()
Is this reader assuming GZip compressed input. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PUSHBACK_BUFFER_SIZE
PushbackInputStream.
protected ByteCountingPushBackInputStream in
InputStream.
protected long startOffset
| Method Detail |
|---|
public boolean isCompressed()
WarcReader
isCompressed in class WarcReaderpublic void close()
WarcReader
close in class WarcReaderpublic long getStartOffset()
WarcReader
getStartOffset in class WarcReaderpublic long getOffset()
WarcReaderInputStream.
getOffset in class WarcReaderInputStreamWarcRecordBase#getStartOffset()public long getConsumed()
WarcReader
getConsumed in class WarcReader
public WarcRecord getNextRecord()
throws IOException
WarcReader
getNextRecord in class WarcReaderIOException - io exception in parsing process
public WarcRecord getNextRecordFrom(InputStream rin,
long offset)
throws IOException
WarcReaderInputstream.
This method is mainly for random access use since there are serious
side-effects involved in using multiple PushBackInputStream
instances.
getNextRecordFrom in class WarcReaderrin - InputStream used to read next recordoffset - offset provided by caller
IOException - io exception in parsing process
public WarcRecord getNextRecordFrom(InputStream rin,
long offset,
int buffer_size)
throws IOException
WarcReaderInputstream wrapped
by a BufferedInputStream.
This method is mainly for random access use since there are serious
side-effects involved in using multiple PushBackInputStream
instances.
getNextRecordFrom in class WarcReaderrin - InputStream used to read next recordoffset - offset provided by callerbuffer_size - buffer size to use
IOException - io exception in parsing process
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||