@Test public void testSetCompressionLevel() { CompressionTransformFactory factory = new CompressionTransformFactory(); for(int i=0; i<10; i++) { factory.setCompressionLevel(i); assertEquals("Compression level did not set correctly", i, factory.getCompressionLevel()); } checkInvalidCompression(factory, CompressionMode.Deflate, -1); checkInvalidCompression(factory, CompressionMode.LZMA, -1); checkInvalidCompression(factory, CompressionMode.Deflate, 10); checkInvalidCompression(factory, CompressionMode.LZMA, 10); }
public void setCompressionLevel(int compressionLevel) { this.compressionLevel = compressionLevel; }
CompressionTransformFactory extends
        TransformFactory<CompressionOutputTransform, CompressionInputTransform> { public void setCompressionLevel(int compressionLevel) { this.compressionLevel = compressionLevel; } }
CompressionTransformFactory extends
        TransformFactory<CompressionOutputTransform, CompressionInputTransform> { public void setCompressionLevel(int compressionLevel) { this.compressionLevel = compressionLevel; } CompressionTransformFactory(); }
CompressionTransformFactory extends
        TransformFactory<CompressionOutputTransform, CompressionInputTransform> { public void setCompressionLevel(int compressionLevel) { this.compressionLevel = compressionLevel; } CompressionTransformFactory(); CompressionMode getCompressMode(); void setCompressMode(CompressionMode compressMode); int getCompressionLevel(); void setCompressionLevel(int compressionLevel); @Override CompressionOutputTransform getOutputTransform(
            OutputStream streamToEncodeTo, Map<String, String> metadataToEncode); @Override CompressionOutputTransform getOutputTransform(
            InputStream streamToEncode, Map<String, String> metadataToEncode); @Override CompressionInputTransform getInputTransform(String transformConfig, InputStream streamToDecode, Map<String, String> metadata); @Override String getTransformClass(); boolean canDecode(String transformClass, String config, Map<String,String> metadata); static long memoryRequiredForLzma(int compressionLevel); static long memoryRequiredForLzma(LzmaProfile profile); }
CompressionTransformFactory extends
        TransformFactory<CompressionOutputTransform, CompressionInputTransform> { public void setCompressionLevel(int compressionLevel) { this.compressionLevel = compressionLevel; } CompressionTransformFactory(); CompressionMode getCompressMode(); void setCompressMode(CompressionMode compressMode); int getCompressionLevel(); void setCompressionLevel(int compressionLevel); @Override CompressionOutputTransform getOutputTransform(
            OutputStream streamToEncodeTo, Map<String, String> metadataToEncode); @Override CompressionOutputTransform getOutputTransform(
            InputStream streamToEncode, Map<String, String> metadataToEncode); @Override CompressionInputTransform getInputTransform(String transformConfig, InputStream streamToDecode, Map<String, String> metadata); @Override String getTransformClass(); boolean canDecode(String transformClass, String config, Map<String,String> metadata); static long memoryRequiredForLzma(int compressionLevel); static long memoryRequiredForLzma(LzmaProfile profile); public CompressionMode compressMode; public int compressionLevel; static LzmaProfile LZMA_COMPRESSION_PROFILE; }