|
|||||||||
| 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.WarcReaderCompressed
public class WarcReaderCompressed
WARC Reader implementation for reading GZip compressed files.
| Field Summary | |
|---|---|
protected int |
bufferSize
Buffer size, if any, to use on GZip entry InputStream. |
static int |
PUSHBACK_BUFFER_SIZE
Buffer size used by PushbackInputStream. |
protected GzipReader |
reader
WARC file InputStream. |
protected long |
startOffset
Cached start offset used after the reader is closed. |
| 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 GzipReader. |
long |
getStartOffset()
Get the current offset in the WARC GzipReader. |
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 GzipReader reader
InputStream.
protected int bufferSize
InputStream.
protected long startOffset
| Method Detail |
|---|
public boolean isCompressed()
WarcReader
isCompressed in class WarcReaderpublic void close()
WarcReader
close in class WarcReaderpublic long getStartOffset()
GzipReader.
getStartOffset in class WarcReaderInputStreampublic long getOffset()
GzipReader.
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 | ||||||||