Package com.ning.compress.lzf.util
Class ChunkDecoderFactory
java.lang.Object
com.ning.compress.lzf.util.ChunkDecoderFactory
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
FieldsModifier and TypeFieldDescriptionprivate final Class
<? extends ChunkDecoder> private static final ChunkDecoderFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChunkDecoder
Method to use for getting decoder instance that uses the most optimal available methods for underlying data access.static ChunkDecoder
Method that can be used to ensure that a "safe" decoder instance is loaded.
-
Field Details
-
_instance
-
_implClass
-
-
Constructor Details
-
ChunkDecoderFactory
-
-
Method Details
-
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 usesafeInstance()
. -
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.
-