org.archive.wayback.resourcestore.resourcefile
Class ArcResource
java.lang.Object
java.io.InputStream
org.archive.wayback.core.Resource
org.archive.wayback.resourcestore.resourcefile.ArcResource
- All Implemented Interfaces:
- java.io.Closeable
public class ArcResource
- extends Resource
|
Constructor Summary |
ArcResource(org.archive.io.arc.ARCRecord rec,
org.archive.io.arc.ARCReader reader)
Constructor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArcResource
public ArcResource(org.archive.io.arc.ARCRecord rec,
org.archive.io.arc.ARCReader reader)
- Constructor
- Parameters:
rec - reader -
parseHeaders
public void parseHeaders()
throws java.io.IOException
- parse the headers on the underlying ARC record, and extract all
- Throws:
java.io.IOException
filterMeta
public java.util.Map<java.lang.String,java.lang.String> filterMeta(java.lang.String prefix)
- Parameters:
prefix -
- Returns:
- a Properties of all elements in metaData starting with 'prefix'.
keys in the returned Properties have 'prefix' removed.
getHttpHeaders
public java.util.Map<java.lang.String,java.lang.String> getHttpHeaders()
- Specified by:
getHttpHeaders in class Resource
- Returns:
- a Properties containing all HTTP header fields for this record
getARCMetadata
public java.util.Map<java.lang.String,java.lang.String> getARCMetadata()
- Returns:
- a Properties containing all ARC Meta fields for this record
getStatusCode
public int getStatusCode()
- (non-Javadoc)
- Specified by:
getStatusCode in class Resource
- Returns:
- int HTTP status code returned with this document.
- See Also:
ARCRecord.getStatusCode()
getArcRecord
public org.archive.io.ArchiveRecord getArcRecord()
- Returns:
- the ARCRecord underlying this Resource.
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Specified by:
close in class Resource
- Throws:
java.io.IOException
getRecordLength
public long getRecordLength()
- Specified by:
getRecordLength in class Resource
- Returns:
- byte length claimed in ARC record metadata line.
Copyright © 2005-2009 Internet Archive. All Rights Reserved.