public final class ArcRecordUtils extends Object
ARCRecords (from archive.org APIs).| Modifier and Type | Method and Description |
|---|---|
static org.archive.io.arc.ARCRecord |
fromBytes(byte[] bytes)
Converts raw bytes into an
ARCRecord. |
static byte[] |
getBodyContent(org.archive.io.arc.ARCRecord record)
Extracts contents of the body from an
ARCRecord. |
static byte[] |
getContent(org.archive.io.arc.ARCRecord record)
Extracts raw contents from an
ARCRecord (including HTTP headers). |
static byte[] |
toBytes(org.archive.io.arc.ARCRecord record)
Converts ARC record into raw bytes.
|
public static org.archive.io.arc.ARCRecord fromBytes(byte[] bytes) throws IOException
ARCRecord.bytes - raw bytesARCRecordIOException - if there is an issuepublic static byte[] toBytes(org.archive.io.arc.ARCRecord record) throws IOException
record - conents of WARC response recordIOException - if there is an issuepublic static byte[] getContent(org.archive.io.arc.ARCRecord record) throws IOException
ARCRecord (including HTTP headers).record - the ARCRecordIOException - if there is an issuepublic static byte[] getBodyContent(org.archive.io.arc.ARCRecord record) throws IOException
ARCRecord.
Excludes HTTP headers.record - the ARCRecordIOException - if there is an issueCopyright © 2017–2020 The Archives Unleashed Project. All rights reserved.