@@ -0,0 +1,1481 @@
+/*%0A * Copyright 2015 Hiroki Uchida%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not use this file except%0A * in compliance with the License. You may obtain a copy of the License at%0A * %0A * http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software distributed under the License%0A * is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express%0A * or implied. See the License for the specific language governing permissions and limitations under%0A * the License.%0A */%0Apackage dmm4j.http;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.zip.GZIPInputStream;%0A%0Afinal class StreamingGZIPInputStream extends GZIPInputStream %7B%0A%0A  private final InputStream wrapped;%0A%0A  public StreamingGZIPInputStream(InputStream is) throws IOException %7B%0A    super(is);%0A    wrapped = is;%0A  %7D%0A%0A  /**%0A   * Overrides behavior of GZIPInputStream which assumes we have all the data available which is not%0A   * true for streaming. We instead rely on the underlying stream to tell us how much data is%0A   * available.%0A   * %3Cp/%3E%0A   * Programs should not count on this method to return the actual number of bytes that could be%0A   * read without blocking.%0A   *%0A   * @return - whatever the wrapped InputStream returns%0A   * @throws IOException if an I/O error occurs.%0A   */%0A  @Override%0A  public int available() throws IOException %7B%0A    return wrapped.available();%0A  %7D%0A%7D%0A

Add StreamingGZIPInputStream