8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 7110149
27 * @summary Test basic deflater & inflater functionality
28 */
29
30 import java.io.*;
31 import java.util.*;
32 import java.util.zip.*;
33
34 public class DeInflate {
35
36 static void check(Deflater compresser, byte[] in, int len,
37 byte[] out1, byte[] out2, boolean nowrap)
38 throws Throwable
39 {
40 Arrays.fill(out1, (byte)0);
41 Arrays.fill(out2, (byte)0);
42
43 compresser.setInput(in, 0, len);
44 compresser.finish();
45 int m = compresser.deflate(out1);
46
47 Inflater decompresser = new Inflater(nowrap);
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 7110149
27 * @summary Test basic deflater & inflater functionality
28 * @key randomness
29 */
30
31 import java.io.*;
32 import java.util.*;
33 import java.util.zip.*;
34
35 public class DeInflate {
36
37 static void check(Deflater compresser, byte[] in, int len,
38 byte[] out1, byte[] out2, boolean nowrap)
39 throws Throwable
40 {
41 Arrays.fill(out1, (byte)0);
42 Arrays.fill(out2, (byte)0);
43
44 compresser.setInput(in, 0, len);
45 compresser.finish();
46 int m = compresser.deflate(out1);
47
48 Inflater decompresser = new Inflater(nowrap);
|