dk.netarkivet.common.utils.archive
Class ArchiveRecordBase

java.lang.Object
  extended by dk.netarkivet.common.utils.archive.ArchiveRecordBase
Direct Known Subclasses:
HeritrixArchiveRecordWrapper

public abstract class ArchiveRecordBase
extends java.lang.Object

Base class for unified ARC/WARC record API:


Field Summary
 boolean bIsArc
          Is this record from an ARC file.
 boolean bIsWarc
          Is this record from a WARC file.
 
Constructor Summary
ArchiveRecordBase()
           
 
Method Summary
abstract  ArchiveHeaderBase getHeader()
          Return the wrapped Heritrix archive header
abstract  java.io.InputStream getInputStream()
          Return the payload input stream.
static ArchiveRecordBase wrapArchiveRecord(org.archive.io.ArchiveRecord archiveRecord)
          Factory method for creating a wrapped Heritrix record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bIsArc

public boolean bIsArc
Is this record from an ARC file.


bIsWarc

public boolean bIsWarc
Is this record from a WARC file.

Constructor Detail

ArchiveRecordBase

public ArchiveRecordBase()
Method Detail

getHeader

public abstract ArchiveHeaderBase getHeader()
Return the wrapped Heritrix archive header

Returns:
the wrapped Heritrix archive header

getInputStream

public abstract java.io.InputStream getInputStream()
Return the payload input stream.

Returns:
the payload input stream

wrapArchiveRecord

public static ArchiveRecordBase wrapArchiveRecord(org.archive.io.ArchiveRecord archiveRecord)
Factory method for creating a wrapped Heritrix record.

Parameters:
archiveRecord - Heritrix archive record
Returns:
wrapped Heritrix record