org.archive.wayback.resourceindex.cdx.format
Class CDXFormat

java.lang.Object
  extended by org.archive.wayback.resourceindex.cdx.format.CDXFormat

public class CDXFormat
extends Object

Class which allows serialization/deserialization of CaptureSearchResult objects into/out of a single line String representation.

Author:
brad

Field Summary
static String CDX_MAGIC
           
static char COMPRESSED_LENGTH
           
static char COMPRESSED_OFFSET
           
protected  char delimiter
           
protected  String delimiterS
           
static char DIGEST
           
protected  CDXField[] fields
           
static char FILE
           
static char HTTP_CODE
           
static char MIME_TYPE
           
static char ORIGINAL_URL
           
static char REDIRECT
           
static char ROBOT_FLAGS
           
static char TIMESTAMP
           
static char URL_KEY
           
 
Constructor Summary
CDXFormat(String cdxSpec)
          Construct a CDXFormat reader/writer based on the specification argument
 
Method Summary
 CaptureSearchResult parseResult(String line)
           
 String serializeResult(CaptureSearchResult result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fields

protected CDXField[] fields

delimiter

protected char delimiter

delimiterS

protected String delimiterS

CDX_MAGIC

public static String CDX_MAGIC

URL_KEY

public static char URL_KEY

TIMESTAMP

public static char TIMESTAMP

ORIGINAL_URL

public static char ORIGINAL_URL

MIME_TYPE

public static char MIME_TYPE

HTTP_CODE

public static char HTTP_CODE

DIGEST

public static char DIGEST

REDIRECT

public static char REDIRECT

ROBOT_FLAGS

public static char ROBOT_FLAGS

COMPRESSED_OFFSET

public static char COMPRESSED_OFFSET

COMPRESSED_LENGTH

public static char COMPRESSED_LENGTH

FILE

public static char FILE
Constructor Detail

CDXFormat

public CDXFormat(String cdxSpec)
          throws CDXFormatException
Construct a CDXFormat reader/writer based on the specification argument

Parameters:
cdxSpec -
Throws:
CDXFormatException
Method Detail

parseResult

public CaptureSearchResult parseResult(String line)
                                throws CDXFormatException
Parameters:
line -
Returns:
CaptureSearchResult containing data from the 'line' argument parsed according the the specification for this CDXFormat
Throws:
CDXFormatException

serializeResult

public String serializeResult(CaptureSearchResult result)
Parameters:
result -
Returns:
String representation of the data in 'result' formatted according to the specification for this CDXFormat


Copyright © 2005-2011 Internet Archive. All Rights Reserved.