|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.archive.io.arc.ARCUtils
public class ARCUtils
Field Summary |
---|
Fields inherited from interface org.archive.io.ArchiveFileConstants |
---|
ABSOLUTE_OFFSET_KEY, CDX, CDX_FILE, CDX_LINE_BUFFER_SIZE, COMPRESSED_FILE_EXTENSION, CRLF, DATE_FIELD_KEY, DEFAULT_DIGEST_METHOD, DUMP, GZIP_DUMP, HEADER, INVALID_SUFFIX, LENGTH_FIELD_KEY, MIMETYPE_FIELD_KEY, NOHEAD, OCCUPIED_SUFFIX, READER_IDENTIFIER_FIELD_KEY, RECORD_IDENTIFIER_FIELD_KEY, SINGLE_SPACE, TYPE_FIELD_KEY, URL_FIELD_KEY, VERSION_FIELD_KEY |
Constructor Summary | |
---|---|
ARCUtils()
|
Method Summary | |
---|---|
static boolean |
isCompressed(java.io.File arcFile)
|
static java.lang.String |
parseArcFilename(java.lang.String pathOrUri)
|
static boolean |
testCompressedARCFile(java.io.File arcFile)
Check file is compressed and in ARC GZIP format. |
static boolean |
testCompressedARCFile(java.io.File arcFile,
boolean skipSuffixCheck)
Check file is compressed and in ARC GZIP format. |
static boolean |
testCompressedARCStream(java.io.InputStream is)
Tests passed stream is gzip stream by reading in the HEAD. |
static boolean |
testCompressedRepositionalStream(it.unimi.dsi.fastutil.io.RepositionableStream rs)
Tests passed stream is gzip stream by reading in the HEAD. |
static boolean |
testCompressedStream(java.io.InputStream is)
Tests passed stream is gzip stream by reading in the HEAD. |
static boolean |
testUncompressedARCFile(java.io.File arcFile)
Check file is uncompressed ARC file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ARCUtils()
Method Detail |
---|
public static java.lang.String parseArcFilename(java.lang.String pathOrUri) throws java.net.URISyntaxException
pathOrUri
- Path or URI to extract arc filename from.
java.net.URISyntaxException
public static boolean isCompressed(java.io.File arcFile) throws java.io.IOException
arcFile
- File to test.
arcFile
is compressed ARC.
java.io.IOException
public static boolean testCompressedARCFile(java.io.File arcFile) throws java.io.IOException
arcFile
- File to test if its Internet Archive ARC file
GZIP compressed.
java.io.IOException
- If file does not exist or is not unreadable.public static boolean testCompressedARCFile(java.io.File arcFile, boolean skipSuffixCheck) throws java.io.IOException
arcFile
- File to test if its Internet Archive ARC file
GZIP compressed.skipSuffixCheck
- Set to true if we're not to test on the
'.arc.gz' suffix.
java.io.IOException
- If file does not exist or is not unreadable.public static boolean testCompressedARCStream(java.io.InputStream is) throws java.io.IOException
is
- An InputStream.
java.io.IOException
public static boolean testCompressedRepositionalStream(it.unimi.dsi.fastutil.io.RepositionableStream rs) throws java.io.IOException
rs
- An InputStream that is Repositionable.
java.io.IOException
public static boolean testCompressedStream(java.io.InputStream is) throws java.io.IOException
is
- An InputStream.
java.io.IOException
public static boolean testUncompressedARCFile(java.io.File arcFile) throws java.io.IOException
arcFile
- File to test if its Internet Archive ARC file uncompressed.
java.io.IOException
- If file does not exist or is not unreadable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |