提交 a4380c5b 编写于 作者: S sherman

8020687: Deflater.setLevel does not work as expected

Summary: to clarify the api to match the existing implementation behavior
Reviewed-by: alanb
上级 233493df
......@@ -261,6 +261,12 @@ class Deflater {
/**
* Sets the compression strategy to the specified value.
*
* <p> If the compression strategy is changed, the next invocation
* of {@code deflate} will compress the input available so far with
* the old strategy (and may be flushed); the new strategy will take
* effect only after that invocation.
*
* @param strategy the new compression strategy
* @exception IllegalArgumentException if the compression strategy is
* invalid
......@@ -283,7 +289,13 @@ class Deflater {
}
/**
* Sets the current compression level to the specified value.
* Sets the compression level to the specified value.
*
* <p> If the compression level is changed, the next invocation
* of {@code deflate} will compress the input available so far
* with the old level (and may be flushed); the new level will
* take effect only after that invocation.
*
* @param level the new compression level (0-9)
* @exception IllegalArgumentException if the compression level is invalid
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册