| |
|
| java.lang.Object org.archive.io.arc.ARCRecordMetaData
Field Summary | |
protected Map | headerFields Map of record header fields.
We store all in a hashmap. |
headerFields | protected Map headerFields(Code) | | Map of record header fields.
We store all in a hashmap. This way we can hold version 1 or
version 2 record meta data.
Keys are lowercase.
|
ARCRecordMetaData | protected ARCRecordMetaData()(Code) | | Shut down the default constructor.
|
ARCRecordMetaData | public ARCRecordMetaData(String arc, Map headerFields) throws IOException(Code) | | Constructor.
Parameters: arc - The arc file this metadata came out of. Parameters: headerFields - Hash of meta fields. throws: IOException - |
getArc | public String getArc()(Code) | | Returns identifier for ARC. |
getArcFile | public File getArcFile()(Code) | | Convenience method that does areturn new File(this.arc) (Be aware this.arc is not alwaysfull path to an ARC file -- may be an URL). Testreturned file for existence. |
getContentBegin | public int getContentBegin()(Code) | | |
getDigest | public String getDigest()(Code) | | Returns the digest. |
getHeaderFieldKeys | public Set getHeaderFieldKeys()(Code) | | Header field name keys. |
getHeaderFields | public Map getHeaderFields()(Code) | | Map of header fields. |
getHeaderValue | public Object getHeaderValue(String key)(Code) | | Parameters: key - Key to use looking up field value. value for passed key of null if no such entry. |
getLength | public long getLength()(Code) | | Return length of the record. |
getMimetype | public String getMimetype()(Code) | | mimetype The mimetype that is in the ARC metaline -- NOT the httpcontent-type content. |
getOffset | public long getOffset()(Code) | | Offset into arcfile at which this record begins. |
getReaderIdentifier | public String getReaderIdentifier()(Code) | | |
getRecordIdentifier | public String getRecordIdentifier()(Code) | | |
getStatusCode | public String getStatusCode()(Code) | | Returns the statusCode. May be null. |
setContentBegin | void setContentBegin(int offset)(Code) | | |
setDigest | public void setDigest(String d)(Code) | | Parameters: d - The digest to set. |
setStatusCode | public void setStatusCode(String statusCode)(Code) | | Parameters: statusCode - The statusCode to set. |
testRequiredField | protected void testRequiredField(Map fields, String requiredField) throws IOException(Code) | | Test required field is present in hash.
Parameters: fields - Map of fields. Parameters: requiredField - Field to test for. exception: IOException - If required field is not present. |
|
|
|