dk.netarkivet.common.utils.arc
Class ARCKey

java.lang.Object
  extended by dk.netarkivet.common.utils.arc.ARCKey

public class ARCKey
extends java.lang.Object

Represents a location key in the ARC format.


Constructor Summary
ARCKey(java.lang.String archiveFileName, long offset)
          Constructor for ARCKey.
 
Method Summary
 java.io.File getFile()
          Getter for arcFile.
 long getOffset()
          Getter for offset.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ARCKey

public ARCKey(java.lang.String archiveFileName,
              long offset)
Constructor for ARCKey. Note that if the filename ends in .dat (it's an Alexa-style DAT file), we assume that the file we actually want is a .arc.gz file as produced by Alexa tools. That is because the Alexa cdx generator does not put the correct filename in there.

Parameters:
archiveFileName - The name of the archive found in the cdx file
offset - The offset in the arc file of this entry.
Method Detail

getOffset

public long getOffset()
Getter for offset.

Returns:
The offset into the ARC file used for this key

getFile

public java.io.File getFile()
Getter for arcFile.

Returns:
The ARC file that this entry can be found in

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a textual representation of filename and offset