|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unkrig.commons.file.org.apache.commons.compress.archivers.ArchiveFormatFactory
public abstract class ArchiveFormatFactory
Manages ArchiveFormats.
Additional archive formats can be 'plugged in' at runtime by putting a resource named FORMATS_RESOURCE on
the classpath.
| Method Summary | |
|---|---|
static java.util.Collection<ArchiveFormat> |
allFormats()
|
static org.apache.commons.compress.archivers.ArchiveInputStream |
archiveInputStream(java.io.InputStream inputStream)
Determines the archive format from the first few bytes of the inputStream and then wraps it in the
appropriate ArchiveInputStream. |
static ArchiveFormat |
forArchiveOutputStream(org.apache.commons.compress.archivers.ArchiveOutputStream archiveOutputStream)
Deprecated. Should be replaced by a new method ArchiveOutputStream.getFormat() |
static ArchiveFormat |
forContents(java.io.File file)
Reads the first few bytes from the given file and determines the archive format. |
static ArchiveFormat |
forContents(java.io.InputStream is)
Reads the first few bytes from the given input stream and determines the archive format. |
static ArchiveFormat |
forFileName(java.lang.String fileName)
|
static ArchiveFormat |
forFormatName(java.lang.String archiveFormatName)
|
static long |
getEntryCrc32(org.apache.commons.compress.archivers.ArchiveEntry archiveEntry)
Deprecated. Should be replaced by a new method ArchiveEntry.getCrc32() |
static org.apache.commons.compress.archivers.ArchiveInputStream |
open(java.io.File archiveFile)
Determines the archive format from the first few bytes of the archiveFile and then returns a
ArchiveInputStream reading from the archiveFile. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Collection<ArchiveFormat> allFormats()
@Nullable public static ArchiveFormat forFileName(java.lang.String fileName)
ArchiveFormat for the given file name, or null iff an archive format cannot
be deduced from the fileNameFileNameUtil.isCompressedFilename(String)
public static ArchiveFormat forFormatName(java.lang.String archiveFormatName)
throws org.apache.commons.compress.archivers.ArchiveException
ArchiveFormat for the given archiveFormatName
org.apache.commons.compress.archivers.ArchiveException - The archiveFormatName is unknown
@Nullable
public static ArchiveFormat forContents(java.io.InputStream is)
throws java.io.IOException
allFormats(), or null iff the stream contents has none of the known
archive formats
java.io.IOException
@Nullable
public static ArchiveFormat forContents(java.io.File file)
throws java.io.IOException
allFormats(), or null iff the file contents has none of the known
archive formats
java.io.IOException@Deprecated public static ArchiveFormat forArchiveOutputStream(org.apache.commons.compress.archivers.ArchiveOutputStream archiveOutputStream)
ArchiveOutputStream.getFormat()
ArchiveFormat corresponding with the archiveOutputStream@Deprecated public static long getEntryCrc32(org.apache.commons.compress.archivers.ArchiveEntry archiveEntry)
ArchiveEntry.getCrc32()
public static org.apache.commons.compress.archivers.ArchiveInputStream archiveInputStream(java.io.InputStream inputStream)
throws java.io.IOException,
org.apache.commons.compress.archivers.ArchiveException
inputStream and then wraps it in the
appropriate ArchiveInputStream.
java.io.IOException
org.apache.commons.compress.archivers.ArchiveException
public static org.apache.commons.compress.archivers.ArchiveInputStream open(java.io.File archiveFile)
throws java.io.IOException,
org.apache.commons.compress.archivers.ArchiveException
archiveFile and then returns a
ArchiveInputStream reading from the archiveFile.
Is typically faster than ArchiveFormatFactory.forContents(archiveFile).archiveInputStream(archiveFile).
java.io.IOException
org.apache.commons.compress.archivers.ArchiveException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||