Package org.tukaani.xz
Class FilterOptions
- java.lang.Object
-
- org.tukaani.xz.FilterOptions
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
ARMOptions,ARMThumbOptions,DeltaOptions,IA64Options,LZMA2Options,PowerPCOptions,SPARCOptions,X86Options
public abstract class FilterOptions extends java.lang.Object implements java.lang.CloneableBase class for filter-specific options classes.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intgetDecoderMemoryUsage()Gets how much memory the decoder will need to decompress the data that was encoded with these options.static intgetDecoderMemoryUsage(FilterOptions[] options)Gets how much memory the decoder will need with the given filter chain.abstract intgetEncoderMemoryUsage()Gets how much memory the encoder will need with these options.static intgetEncoderMemoryUsage(FilterOptions[] options)Gets how much memory the encoder will need with the given filter chain.java.io.InputStreamgetInputStream(java.io.InputStream in)Gets a raw (no XZ headers) decoder input stream using these options.abstract java.io.InputStreamgetInputStream(java.io.InputStream in, ArrayCache arrayCache)Gets a raw (no XZ headers) decoder input stream using these options and the given ArrayCache.FinishableOutputStreamgetOutputStream(FinishableOutputStream out)Gets a raw (no XZ headers) encoder output stream using these options.abstract FinishableOutputStreamgetOutputStream(FinishableOutputStream out, ArrayCache arrayCache)Gets a raw (no XZ headers) encoder output stream using these options and the given ArrayCache.
-
-
-
Method Detail
-
getEncoderMemoryUsage
public static int getEncoderMemoryUsage(FilterOptions[] options)
Gets how much memory the encoder will need with the given filter chain. This function simply callsgetEncoderMemoryUsage()for every filter in the array and returns the sum of the returned values.
-
getDecoderMemoryUsage
public static int getDecoderMemoryUsage(FilterOptions[] options)
Gets how much memory the decoder will need with the given filter chain. This function simply callsgetDecoderMemoryUsage()for every filter in the array and returns the sum of the returned values.
-
getEncoderMemoryUsage
public abstract int getEncoderMemoryUsage()
Gets how much memory the encoder will need with these options.
-
getOutputStream
public FinishableOutputStream getOutputStream(FinishableOutputStream out)
Gets a raw (no XZ headers) encoder output stream using these options. Raw streams are an advanced feature. In most cases you want to store the compressed data in the .xz container format instead of using a raw stream. To use this filter in a .xz file, pass this object to XZOutputStream.This is uses ArrayCache.getDefaultCache() as the ArrayCache.
-
getOutputStream
public abstract FinishableOutputStream getOutputStream(FinishableOutputStream out, ArrayCache arrayCache)
Gets a raw (no XZ headers) encoder output stream using these options and the given ArrayCache. Raw streams are an advanced feature. In most cases you want to store the compressed data in the .xz container format instead of using a raw stream. To use this filter in a .xz file, pass this object to XZOutputStream.
-
getDecoderMemoryUsage
public abstract int getDecoderMemoryUsage()
Gets how much memory the decoder will need to decompress the data that was encoded with these options.
-
getInputStream
public java.io.InputStream getInputStream(java.io.InputStream in) throws java.io.IOExceptionGets a raw (no XZ headers) decoder input stream using these options.This is uses ArrayCache.getDefaultCache() as the ArrayCache.
- Throws:
java.io.IOException
-
getInputStream
public abstract java.io.InputStream getInputStream(java.io.InputStream in, ArrayCache arrayCache) throws java.io.IOExceptionGets a raw (no XZ headers) decoder input stream using these options and the given ArrayCache.- Throws:
java.io.IOException
-
-