Class CoderBase
java.lang.Object
org.apache.commons.compress.archivers.sevenz.CoderBase
- Direct Known Subclasses:
AES256SHA256Decoder
,Coders.BCJDecoder
,Coders.BZIP2Decoder
,Coders.CopyDecoder
,Coders.Deflate64Decoder
,Coders.DeflateDecoder
,DeltaDecoder
,LZMA2Decoder
,LZMADecoder
Base Codec class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
canAcceptOptions
(Object opts) (package private) abstract InputStream
decode
(String archiveName, InputStream in, long uncompressedLength, Coder coder, byte[] password, int maxMemoryLimitInKb) (package private) OutputStream
encode
(OutputStream out, Object options) (package private) byte[]
getOptionsAsProperties
(Object options) (package private) Object
getOptionsFromCoder
(Coder coder, InputStream in) protected static int
numberOptionOrDefault
(Object options, int defaultValue) If the option represents a number, return its integer value, otherwise return the given default value.
-
Field Details
-
acceptableOptions
-
-
Constructor Details
-
CoderBase
- Parameters:
acceptableOptions
- types that can be used as options for this codec.
-
-
Method Details
-
canAcceptOptions
- Returns:
- whether this method can extract options from the given object.
-
getOptionsAsProperties
- Returns:
- property-bytes to write in a Folder block
- Throws:
IOException
-
getOptionsFromCoder
- Returns:
- configuration options that have been used to create the given InputStream from the given Coder
- Throws:
IOException
-
decode
abstract InputStream decode(String archiveName, InputStream in, long uncompressedLength, Coder coder, byte[] password, int maxMemoryLimitInKb) throws IOException - Returns:
- a stream that reads from in using the configured coder and password.
- Throws:
IOException
-
encode
- Returns:
- a stream that writes to out using the given configuration.
- Throws:
IOException
-
numberOptionOrDefault
If the option represents a number, return its integer value, otherwise return the given default value.
-