2362N/A * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Implements an output stream filter for uncompressing data stored in the 0N/A * "deflate" compression format. 0N/A * @author David R Tribble (david@tribble.com) 0N/A * @see InflaterInputStream 0N/A * @see DeflaterInputStream 0N/A * @see DeflaterOutputStream 0N/A /** Decompressor for this stream. */ 0N/A /** Output buffer for writing uncompressed data. */ 0N/A /** Temporary write buffer. */ 0N/A private final byte[]
wbuf =
new byte[
1];
0N/A /** Default decompressor is used. */ 0N/A /** true iff {@link #close()} has been called. */ 0N/A * Checks to make sure that this stream has not been closed. 0N/A * Creates a new output stream with a default decompressor and buffer 0N/A * @param out output stream to write the uncompressed data to 0N/A * @throws NullPointerException if {@code out} is null 0N/A * Creates a new output stream with the specified decompressor and a 0N/A * default buffer size. 0N/A * @param out output stream to write the uncompressed data to 0N/A * @param infl decompressor ("inflater") for this stream 0N/A * @throws NullPointerException if {@code out} or {@code infl} is null 0N/A * Creates a new output stream with the specified decompressor and 0N/A * @param out output stream to write the uncompressed data to 0N/A * @param infl decompressor ("inflater") for this stream 0N/A * @param bufLen decompression buffer size 0N/A * @throws IllegalArgumentException if {@code bufLen} is <= 0 0N/A * @throws NullPointerException if {@code out} or {@code infl} is null 0N/A * Writes any remaining uncompressed data to the output stream and closes 0N/A * the underlying output stream. 0N/A * @throws IOException if an I/O error occurs 0N/A // Complete the uncompressed output 0N/A * Flushes this output stream, forcing any pending buffered output bytes to be 0N/A * @throws IOException if an I/O error occurs or this stream is already 0N/A // Finish decompressing and writing pending output data 0N/A // Decompress pending output data 0N/A // Write the uncompressed output data block 0N/A // Improperly formatted compressed (ZIP) data 0N/A msg =
"Invalid ZLIB data format";
0N/A * Finishes writing uncompressed data to the output stream without closing 0N/A * the underlying stream. Use this method when applying multiple filters in 0N/A * succession to the same output stream. 0N/A * @throws IOException if an I/O error occurs or this stream is already 0N/A // Finish decompressing and writing pending output data 0N/A * Writes a byte to the uncompressed output stream. 0N/A * @param b a single byte of compressed data to decompress and write to 0N/A * @throws IOException if an I/O error occurs or this stream is already 0N/A * @throws ZipException if a compression (ZIP) format error occurs 0N/A // Write a single byte of data 0N/A * Writes an array of bytes to the uncompressed output stream. 0N/A * @param b buffer containing compressed data to decompress and write to 0N/A * @param off starting offset of the compressed data within {@code b} 0N/A * @param len number of bytes to decompress from {@code b} 0N/A * @throws IndexOutOfBoundsException if {@code off} < 0, or if 0N/A * {@code len} < 0, or if {@code len} > {@code b.length - off} 0N/A * @throws IOException if an I/O error occurs or this stream is already 0N/A * @throws NullPointerException if {@code b} is null 0N/A * @throws ZipException if a compression (ZIP) format error occurs 0N/A // Write uncompressed data to the output stream 0N/A // Fill the decompressor buffer with output data 0N/A // Decompress and write blocks of output data 0N/A // Check the decompressor 0N/A // Improperly formatted compressed (ZIP) data 0N/A msg =
"Invalid ZLIB data format";