public class BitarchiveRecord extends Object implements Serializable
Constructor and Description |
---|
BitarchiveRecord(org.archive.io.ArchiveRecord record,
String filename)
Creates a BitarchiveRecord from the a ArchiveRecord, which can be either a ARCRecord or WARCRecord.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getData()
Retrieve the data in the record.
|
void |
getData(OutputStream out)
Deliver the data in the record to a given OutputStream.
|
String |
getFile()
Returns the file that this information was loaded from.
|
long |
getLength()
Returns the length of the ARCRecord contained.
|
public BitarchiveRecord(org.archive.io.ArchiveRecord record, String filename)
If the length of the record is higher than Settings .BITARCHIVE_LIMIT_FOR_RECORD_DATATRANSFER_IN_FILE the data is stored in a RemoteFile, otherwise the data is stored in a byte array.
record
- the ArchiveRecord that the data should come from. We do not close the ArchiveRecord.filename
- The filename of the ArchiveFilepublic String getFile()
public long getLength()
public InputStream getData()
IllegalState
- if remotefile already deletedpublic void getData(OutputStream out)
out
- deliver the data to this outputstreamIOFailure
- if any IOException occurs reading or writing the dataIllegalState
- if remotefile already deletedCopyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.