Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing MultiMemberGZIPInputStream #59

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
import org.openstreetmap.osmosis.core.lifecycle.Completable;
import org.openstreetmap.osmosis.core.lifecycle.ReleasableIterator;
import org.openstreetmap.osmosis.core.util.MultiMemberGZIPInputStream;


/**
Expand Down Expand Up @@ -274,7 +274,7 @@ public ReleasableIterator<T> iterate(long streamOffset, long maxObjectCount) {
if (useCompression) {
dataInStream = new DataInputStream(
new BufferedInputStream(
new MultiMemberGZIPInputStream(fileStream), 65536));
new GZIPInputStream(fileStream), 65536));
} else {
dataInStream = new DataInputStream(new BufferedInputStream(fileStream, 65536));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
import org.openstreetmap.osmosis.core.lifecycle.Completable;
import org.openstreetmap.osmosis.core.lifecycle.ReleasableIterator;
import org.openstreetmap.osmosis.core.util.MultiMemberGZIPInputStream;


/**
* Provides a store for writing objects to a file for later retrieval. The
Expand Down Expand Up @@ -173,7 +172,7 @@ public ReleasableIterator<T> iterate() {
try {
if (useCompression) {
dataInStream = new DataInputStream(
new BufferedInputStream(new MultiMemberGZIPInputStream(fileStream), 65536));
new BufferedInputStream(new GZIPInputStream(fileStream), 65536));
} else {
dataInStream = new DataInputStream(
new BufferedInputStream(fileStream, 65536));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;

import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
import org.openstreetmap.osmosis.core.util.MultiMemberGZIPInputStream;


/**
Expand Down Expand Up @@ -85,7 +85,7 @@ public InputStream createCompressionInputStream(InputStream sourceStream) {
}

if (CompressionMethod.GZip.equals(compressionMethod)) {
return new MultiMemberGZIPInputStream(sourceStream);
return new GZIPInputStream(sourceStream);
}

if (CompressionMethod.BZip2.equals(compressionMethod)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Collections;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPInputStream;
import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;

Expand All @@ -24,7 +25,6 @@
import org.openstreetmap.osmosis.core.domain.v0_6.Bound;
import org.openstreetmap.osmosis.core.task.v0_6.RunnableSource;
import org.openstreetmap.osmosis.core.task.v0_6.Sink;
import org.openstreetmap.osmosis.core.util.MultiMemberGZIPInputStream;
import org.openstreetmap.osmosis.xml.v0_6.impl.OsmHandler;
import org.openstreetmap.osmosis.xml.v0_6.impl.XmlConstants;

Expand Down Expand Up @@ -265,7 +265,7 @@ private InputStream getInputStream(final String pUrlStr) throws IOException {

responseStream = myActiveConnection.getInputStream();
if (encoding != null && encoding.equalsIgnoreCase("gzip")) {
responseStream = new MultiMemberGZIPInputStream(responseStream);
responseStream = new GZIPInputStream(responseStream);
} else if (encoding != null && encoding.equalsIgnoreCase("deflate")) {
responseStream = new InflaterInputStream(responseStream, new Inflater(true));
}
Expand Down