Last change
on this file since 5508 was 5361, checked in by Don-vip, 12 years ago |
fix #7879 - Allow to open local and remote gzipped/bzipped osmChange files + remote osm.gz files + make some public constants of File filters to share between same importers/exporters
|
-
Property svn:eol-style
set to
native
|
File size:
843 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.io;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.io.File;
|
---|
7 | import java.io.FileInputStream;
|
---|
8 | import java.io.IOException;
|
---|
9 |
|
---|
10 | import org.openstreetmap.josm.actions.ExtensionFileFilter;
|
---|
11 | import org.openstreetmap.josm.gui.progress.ProgressMonitor;
|
---|
12 |
|
---|
13 | public class OsmGzipImporter extends OsmImporter {
|
---|
14 |
|
---|
15 | public static final ExtensionFileFilter FILE_FILTER = new ExtensionFileFilter(
|
---|
16 | "osm.gz", "osm.gz", tr("OSM Server Files gzip compressed") + " (*.osm.gz)");
|
---|
17 |
|
---|
18 | public OsmGzipImporter() {
|
---|
19 | super(FILE_FILTER);
|
---|
20 | }
|
---|
21 |
|
---|
22 | @Override
|
---|
23 | public void importData(File file, ProgressMonitor progressMonitor) throws IOException, IllegalDataException {
|
---|
24 | importData(getGZipInputStream(new FileInputStream(file)), file);
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.