Top Description Methods
org.apache.commons.compress.archivers

public Interface ArchiveStreamProvider

Known Direct Implementers
org.apache.commons.compress.archivers.ArchiveStreamFactory
Imports
java.io.InputStream, .OutputStream, java.util.Set

Creates Archive ArchiveInputStreams and ArchiveOutputStreams.
Since
1.13

Method Summary

Modifier and TypeMethod and Description
public <I extends ArchiveInputStream<? extends ArchiveEntry>> I

Returns:

the archive input stream
createArchiveInputStream
(String
the archiver name, i.e. ar, arj, zip, tar, jar, cpio, dump or 7z
archiverName
,
InputStream
the input stream
inputStream
,
String
encoding name or null for the default
encoding
)

Creates an archive input stream from an archiver name and an input stream.

public <O extends ArchiveOutputStream<? extends ArchiveEntry>> O

Returns:

the archive output stream
createArchiveOutputStream
(String
the archiver name, i.e. ar, zip, tar, jar or cpio
archiverName
,
OutputStream
the output stream
outputStream
,
String
encoding name or null for the default
encoding
)

Creates an archive output stream from an archiver name and an output stream.

public Set<String>

Returns:

all the input archive names for this provider
getInputStreamArchiveNames
()

Gets all the input stream archive names for this provider

public Set<String>

Returns:

all the output archive names for this provider
getOutputStreamArchiveNames
()

Gets all the output stream archive names for this provider

Method Detail

createArchiveInputStreamback to summary
public <I extends ArchiveInputStream<? extends ArchiveEntry>> I createArchiveInputStream(String archiverName, InputStream inputStream, String encoding) throws ArchiveException

Creates an archive input stream from an archiver name and an input stream.

Parameters
<I>
The ArchiveInputStream type.
archiverName:String

the archiver name, i.e. ar, arj, zip, tar, jar, cpio, dump or 7z

inputStream:InputStream

the input stream

encoding:String

encoding name or null for the default

Returns:I

the archive input stream

Exceptions
ArchiveException:
if the archiver name is not known
StreamingNotSupportedException:
if the format cannot be read from a stream
IllegalArgumentException:
if the archiver name or stream is null
createArchiveOutputStreamback to summary
public <O extends ArchiveOutputStream<? extends ArchiveEntry>> O createArchiveOutputStream(String archiverName, OutputStream outputStream, String encoding) throws ArchiveException

Creates an archive output stream from an archiver name and an output stream.

Parameters
<O>
The ArchiveInputStream type.
archiverName:String

the archiver name, i.e. ar, zip, tar, jar or cpio

outputStream:OutputStream

the output stream

encoding:String

encoding name or null for the default

Returns:O

the archive output stream

Exceptions
ArchiveException:
if the archiver name is not known
StreamingNotSupportedException:
if the format cannot be written to a stream
IllegalArgumentException:
if the archiver name or stream is null
getInputStreamArchiveNamesback to summary
public Set<String> getInputStreamArchiveNames()

Gets all the input stream archive names for this provider

Returns:Set<String>

all the input archive names for this provider

getOutputStreamArchiveNamesback to summary
public Set<String> getOutputStreamArchiveNames()

Gets all the output stream archive names for this provider

Returns:Set<String>

all the output archive names for this provider