org.archive.wayback.resourcestore.resourcefile
Class WarcResource
java.lang.Object
java.io.InputStream
org.archive.wayback.core.Resource
org.archive.wayback.resourcestore.resourcefile.WarcResource
- All Implemented Interfaces:
- Closeable
public class WarcResource
- extends Resource
|
Constructor Summary |
WarcResource(org.archive.io.warc.WARCRecord rec,
org.archive.io.warc.WARCReader reader)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WarcResource
public WarcResource(org.archive.io.warc.WARCRecord rec,
org.archive.io.warc.WARCReader reader)
parseHeaders
public void parseHeaders()
throws IOException
- Throws:
IOException
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:
- key-value Map of HTTP headers
getRecordLength
public long getRecordLength()
- Specified by:
getRecordLength in class Resource
- Returns:
- the size in bytes of the record payload, including HTTP header
getStatusCode
public int getStatusCode()
- Description copied from class:
Resource
- Assumes an HTTP resource - return the HTTP response code
- Specified by:
getStatusCode in class Resource
- Returns:
- the HTTP response code from the HTTP message
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Specified by:
close in class Resource
- Throws:
IOException
Copyright © 2005-2011 Internet Archive. All Rights Reserved.