Top Description Fields Constructors Methods
com.ning.compress.lzf.util

public Class ChunkDecoderFactory

extends Object
Class Inheritance
Imports
com.ning.compress.lzf.ChunkDecoder, com.ning.compress.lzf.impl.VanillaChunkDecoder, .UnsafeChunkDecoder

Simple helper class used for loading ChunkDecoder implementations, based on criteria such as "fastest available".

Yes, it looks butt-ugly, but does the job. Nonetheless, if anyone has lipstick for this pig, let me know.

Field Summary

Modifier and TypeField and Description
private final Class<? extends ChunkDecoder>
private static final ChunkDecoderFactory

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ChunkDecoder
optimalInstance()

Method to use for getting decoder instance that uses the most optimal available methods for underlying data access.

public static ChunkDecoder
safeInstance()

Method that can be used to ensure that a "safe" decoder instance is loaded.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_implClassback to summary
private final Class<? extends ChunkDecoder> _implClass
_instanceback to summary
private static final ChunkDecoderFactory _instance

Constructor Detail

ChunkDecoderFactoryback to summary
private ChunkDecoderFactory(Class<?> imp)
Annotations
@SuppressWarnings:unchecked

Method Detail

optimalInstanceback to summary
public static ChunkDecoder optimalInstance()

Method to use for getting decoder instance that uses the most optimal available methods for underlying data access. It should be safe to call this method as implementations are dynamically loaded; however, on some non-standard platforms it may be necessary to either directly load instances, or use safeInstance().

safeInstanceback to summary
public static ChunkDecoder safeInstance()

Method that can be used to ensure that a "safe" decoder instance is loaded. Safe here means that it should work on any and all Java platforms.