|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.utils.WARCUtils
public class WARCUtils
Various utilities on WARC-records. We have borrowed code from wayback.
org.archive.wayback.resourcestore.indexer.WARCRecordToSearchResultAdapter.java
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
Logging output place. |
Constructor Summary | |
---|---|
WARCUtils()
|
Method Summary | |
---|---|
static java.lang.String |
getRecordType(org.archive.io.warc.WARCRecord record)
Find out what type of WARC-record this is. |
static byte[] |
readWARCRecord(org.archive.io.warc.WARCRecord record)
Read the contents (payload) of an WARC record into a byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public WARCUtils()
Method Detail |
---|
public static byte[] readWARCRecord(org.archive.io.warc.WARCRecord record) throws IOFailure
record
- An WARC record to read from. After reading, the WARC Record
will no longer have its own data available for reading.
IOFailure
- If there is an error reading the data, or if the record is
longer than Integer.MAX_VALUE (since we can't make bigger
arrays).public static java.lang.String getRecordType(org.archive.io.warc.WARCRecord record)
record
- a given WARCRecord
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |