001    // License: GPL. For details, see LICENSE file.
002    package org.openstreetmap.josm.io;
003    
004    import java.io.File;
005    import java.io.FileNotFoundException;
006    import java.io.FileOutputStream;
007    import java.io.IOException;
008    import java.io.OutputStream;
009    
010    import org.apache.tools.bzip2.CBZip2OutputStream;
011    public class OsmBzip2Exporter extends OsmExporter {
012    
013        public OsmBzip2Exporter() {
014            super(OsmBzip2Importer.FILE_FILTER);
015        }
016    
017        @Override
018        protected OutputStream getOutputStream(File file) throws FileNotFoundException, IOException {
019            OutputStream out = new FileOutputStream(file);
020            out.write('B');
021            out.write('Z');
022            out = new CBZip2OutputStream(out);
023            return out;
024        }
025    }