public class ReaderFactoryAbstract extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ARC_MAGIC_HEADER
An ARC version block starts with this string.
|
protected static int |
GZIP_MAGIC
GZip header magic number.
|
protected static java.lang.String |
WARC_MAGIC_HEADER
A WARC header block starts with this string including trailing version
information.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ReaderFactoryAbstract()
Private constructor to enforce factory methods.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isArcFile(ByteCountingPushBackInputStream pbin)
Check head of
PushBackInputStream for an ARC file identifier. |
static boolean |
isArcRecord(ByteCountingPushBackInputStream pbin)
Check head of
PushBackInputStream for an ARC record identifier. |
static boolean |
isGzipped(ByteCountingPushBackInputStream pbin)
Check head of
PushBackInputStream for a GZip magic number. |
static boolean |
isWarcFile(ByteCountingPushBackInputStream pbin)
Check head of
PushBackInputStream for a WARC file identifier. |
static boolean |
isWarcRecord(ByteCountingPushBackInputStream pbin)
Check head of
PushBackInputStream for a WARC record identifier. |
protected static final int GZIP_MAGIC
protected static final java.lang.String ARC_MAGIC_HEADER
protected static final java.lang.String WARC_MAGIC_HEADER
protected ReaderFactoryAbstract()
public static boolean isGzipped(ByteCountingPushBackInputStream pbin) throws java.io.IOException
PushBackInputStream for a GZip magic number.
The state of the PushBackInputStream is the same after the
call as before the call.pbin - PushBackInputStream with GZip entriesjava.io.IOException - if an I/O error occurs while examining head of streampublic static boolean isArcFile(ByteCountingPushBackInputStream pbin) throws java.io.IOException
PushBackInputStream for an ARC file identifier.
The identifier for ARC files is "filedesc:" in the beginning.pbin - PushBackInputStream with an ARC version blockjava.io.IOException - if an I/O error occurs while examining head of streampublic static boolean isArcRecord(ByteCountingPushBackInputStream pbin) throws java.io.IOException
PushBackInputStream for an ARC record identifier.
The identifier for ARC files is "filedesc:" in the beginning.pbin - PushBackInputStream with an ARC version blockjava.io.IOException - if an I/O error occurs while examining head of streampublic static boolean isWarcFile(ByteCountingPushBackInputStream pbin) throws java.io.IOException
PushBackInputStream for a WARC file identifier.
The identifier for WARC files is "WARC/" in the beginning.pbin - PushBackInputStream with WARC recordsjava.io.IOException - if an I/O error occurs while examining head of streampublic static boolean isWarcRecord(ByteCountingPushBackInputStream pbin) throws java.io.IOException
PushBackInputStream for a WARC record identifier.
The identifier for WARC records is "WARC/" in the beginning.pbin - PushBackInputStream with WARC recordsjava.io.IOException - if an I/O error occurs while examining head of streamCopyright © 2011–2023. All rights reserved.