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:
- 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 IOException
- parse the headers on the underlying ARC record, and extract all
- Throws:
IOException
filterMeta
public Map<String,String> filterMeta(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 Map<String,String> getHttpHeaders()
- Description copied from class:
Resource
- Assumes an HTTP response - return the HTTP headers, not including the
HTTP Message header
- Specified by:
getHttpHeaders in class Resource
- Returns:
- a Properties containing all HTTP header fields for this record
getARCMetadata
public Map<String,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 IOException
- Specified by:
close in interface Closeable- Specified by:
close in class Resource
- Throws:
IOException
getRecordLength
public long getRecordLength()
- Specified by:
getRecordLength in class Resource
- Returns:
- byte length claimed in ARC record metadata line.
Copyright © 2005-2011 Internet Archive. All Rights Reserved.