public final class ArcRecordUtils extends Object
ARCRecord
s (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 bytesARCRecord
IOException
- 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 ARCRecord
IOException
- if there is an issuepublic static byte[] getBodyContent(org.archive.io.arc.ARCRecord record) throws IOException
ARCRecord
.
Excludes HTTP headers.record
- the ARCRecord
IOException
- if there is an issueCopyright © 2018 The Archives Unleased Project. All rights reserved.