/** * Constructs a new {@code Deflater} instance with the * given <a href="#compression_level">compression level</a>. * If {@code noHeader} is true, no ZLIB header is added to the * output. In a zip file, every entry (compressed file) comes with such a * header. The strategy can be specified using {@link #setStrategy}. */ public Deflater(int level, boolean noHeader) { if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) { throw new IllegalArgumentException("Bad level: " + level); } compressLevel = level; streamHandle = createStream(compressLevel, strategy, noHeader); guard.open("end"); }
/** * Constructs a new {@code Deflater} instance with the * given <a href="#compression_level">compression level</a>. * If {@code noHeader} is true, no ZLIB header is added to the * output. In a zip file, every entry (compressed file) comes with such a * header. The strategy can be specified using {@link #setStrategy}. */ public Deflater(int level, boolean noHeader) { if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) { throw new IllegalArgumentException("Bad level: " + level); } compressLevel = level; streamHandle = createStream(compressLevel, strategy, noHeader); guard.open("end"); }
/** * Constructs a new {@code Deflater} instance with the * given <a href="#compression_level">compression level</a>. * If {@code noHeader} is true, no ZLIB header is added to the * output. In a zip file, every entry (compressed file) comes with such a * header. The strategy can be specified using {@link #setStrategy}. */ public Deflater(int level, boolean noHeader) { if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) { throw new IllegalArgumentException("Bad level: " + level); } compressLevel = level; streamHandle = createStream(compressLevel, strategy, noHeader); guard.open("end"); }
/** * Constructs a new {@code Deflater} instance with the * given <a href="#compression_level">compression level</a>. * If {@code noHeader} is true, no ZLIB header is added to the * output. In a zip file, every entry (compressed file) comes with such a * header. The strategy can be specified using {@link #setStrategy}. */ public Deflater(int level, boolean noHeader) { if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) { throw new IllegalArgumentException("Bad level: " + level); } compressLevel = level; streamHandle = createStream(compressLevel, strategy, noHeader); guard.open("end"); }
/** * Constructs a new {@code Deflater} instance with the * given <a href="#compression_level">compression level</a>. * If {@code noHeader} is true, no ZLIB header is added to the * output. In a zip file, every entry (compressed file) comes with such a * header. The strategy can be specified using {@link #setStrategy}. */ public Deflater(int level, boolean noHeader) { if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) { throw new IllegalArgumentException("Bad level: " + level); } compressLevel = level; streamHandle = createStream(compressLevel, strategy, noHeader); guard.open("end"); }
/** * Constructs a new {@code Deflater} instance with the * given <a href="#compression_level">compression level</a>. * If {@code noHeader} is true, no ZLIB header is added to the * output. In a zip file, every entry (compressed file) comes with such a * header. The strategy can be specified using {@link #setStrategy}. */ public Deflater(int level, boolean noHeader) { if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) { throw new IllegalArgumentException("Bad level: " + level); } compressLevel = level; streamHandle = createStream(compressLevel, strategy, noHeader); guard.open("end"); }
/** * Constructs a new {@code Deflater} instance with the * given <a href="#compression_level">compression level</a>. * If {@code noHeader} is true, no ZLIB header is added to the * output. In a zip file, every entry (compressed file) comes with such a * header. The strategy can be specified using {@link #setStrategy}. */ public Deflater(int level, boolean noHeader) { if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) { throw new IllegalArgumentException("Bad level: " + level); } compressLevel = level; streamHandle = createStream(compressLevel, strategy, noHeader); guard.open("end"); }