|
Last change
on this file since 6073 was 5361, checked in by Don-vip, 13 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:
707 bytes
|
| Line | |
|---|
| 1 | // License: GPL. For details, see LICENSE file.
|
|---|
| 2 | package org.openstreetmap.josm.io;
|
|---|
| 3 |
|
|---|
| 4 | import java.io.File;
|
|---|
| 5 | import java.io.FileNotFoundException;
|
|---|
| 6 | import java.io.FileOutputStream;
|
|---|
| 7 | import java.io.IOException;
|
|---|
| 8 | import java.io.OutputStream;
|
|---|
| 9 |
|
|---|
| 10 | import org.apache.tools.bzip2.CBZip2OutputStream;
|
|---|
| 11 | public class OsmBzip2Exporter extends OsmExporter {
|
|---|
| 12 |
|
|---|
| 13 | public OsmBzip2Exporter() {
|
|---|
| 14 | super(OsmBzip2Importer.FILE_FILTER);
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | @Override
|
|---|
| 18 | protected OutputStream getOutputStream(File file) throws FileNotFoundException, IOException {
|
|---|
| 19 | OutputStream out = new FileOutputStream(file);
|
|---|
| 20 | out.write('B');
|
|---|
| 21 | out.write('Z');
|
|---|
| 22 | out = new CBZip2OutputStream(out);
|
|---|
| 23 | return out;
|
|---|
| 24 | }
|
|---|
| 25 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.