public class WarcResource extends Resource
| Modifier and Type | Field and Description |
|---|---|
static String |
PROFILE_REVISIT_SERVER_NOT_MODIFIED |
| Constructor and Description |
|---|
WarcResource(org.archive.io.warc.WARCRecord rec,
org.archive.io.ArchiveReader reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Map<String,String> |
getHttpHeaders()
Assumes an HTTP response - return the HTTP headers, not including the
HTTP Message header
|
long |
getRecordLength() |
String |
getRefersToDate()
return
WARC-Refers-To-Date WARC record header value or
equivalent. |
String |
getRefersToTargetURI()
return
WARC-Refer-To-Target-URI WARC record header value or
equivalent. |
int |
getStatusCode()
Assumes an HTTP resource - return the HTTP response code
|
org.archive.io.ArchiveRecordHeader |
getWarcHeaders() |
boolean |
isRevisitNotModified()
whether this Resource is
server-not-modified revisit. |
void |
parseHeaders() |
available, getHeader, mark, markSupported, read, read, read, reset, setChunkedEncoding, setInputStream, skippublic static final String PROFILE_REVISIT_SERVER_NOT_MODIFIED
public WarcResource(org.archive.io.warc.WARCRecord rec,
org.archive.io.ArchiveReader reader)
public void parseHeaders()
throws IOException
parseHeaders in class ResourceIOExceptionpublic Map<String,String> getHttpHeaders()
ResourcegetHttpHeaders in class Resourcepublic org.archive.io.ArchiveRecordHeader getWarcHeaders()
public long getRecordLength()
getRecordLength in class Resourcepublic int getStatusCode()
ResourcegetStatusCode in class Resourcepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ResourceIOExceptionpublic String getRefersToTargetURI()
ResourceWARC-Refer-To-Target-URI WARC record header value or
equivalent.
Default implementation returns null.getRefersToTargetURI in class Resourcepublic String getRefersToDate()
ResourceWARC-Refers-To-Date WARC record header value or
equivalent.
Default implementation returns nullgetRefersToDate in class ResourceyyyyMMddHHmmss)public boolean isRevisitNotModified()
server-not-modified revisit.
(this method used to be AccessPoint#isWarcRevisitNotModified(Resource).
Not made a part of Resource interface because it was unused.)true if it isCopyright © 2005–2015 IIPC. All rights reserved.