Rev | Line | |
---|
[1949] | 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.FileNotFoundException;
|
---|
| 8 | import java.io.FileOutputStream;
|
---|
| 9 | import java.io.IOException;
|
---|
| 10 | import java.io.OutputStream;
|
---|
| 11 |
|
---|
| 12 | import org.apache.tools.bzip2.CBZip2OutputStream;
|
---|
| 13 | import org.openstreetmap.josm.actions.ExtensionFileFilter;
|
---|
| 14 | public class OsmBzip2Exporter extends OsmExporter {
|
---|
| 15 |
|
---|
| 16 | public OsmBzip2Exporter() {
|
---|
| 17 | super(new ExtensionFileFilter("osm.bz2, osm.bz", "osm.bz2", tr("OSM Server Files bzip2 compressed")
|
---|
| 18 | + " (*.osm.bz2 *.osm.bz)"));
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | @Override
|
---|
| 22 | protected OutputStream getOutputStream(File file) throws FileNotFoundException, IOException {
|
---|
| 23 | OutputStream out = new FileOutputStream(file);
|
---|
| 24 | out.write('B');
|
---|
| 25 | out.write('Z');
|
---|
| 26 | out = new CBZip2OutputStream(out);
|
---|
| 27 | return out;
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.