public class OsmExporter extends FileExporter
filter
Constructor and Description |
---|
OsmExporter()
Constructs a new
OsmExporter . |
OsmExporter(ExtensionFileFilter filter)
Constructs a new
OsmExporter . |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFile(File pathname,
Layer layer) |
protected static void |
checkOsmDataLayer(Layer layer) |
protected void |
doSave(File file,
OsmDataLayer layer) |
void |
exportData(File file,
Layer layer) |
void |
exportData(File file,
Layer layer,
boolean noBackup)
Exports OSM data to the given file.
|
protected static OutputStream |
getOutputStream(File file) |
private void |
save(File file,
OsmDataLayer layer,
boolean noBackup) |
activeLayerChange, isCanceled, isEnabled, layerAdded, layerRemoved, setCanceled, setEnabled
public OsmExporter()
OsmExporter
.public OsmExporter(ExtensionFileFilter filter)
OsmExporter
.filter
- The extension file filterpublic boolean acceptFile(File pathname, Layer layer)
acceptFile
in class FileExporter
public void exportData(File file, Layer layer) throws IOException
exportData
in class FileExporter
IOException
public void exportData(File file, Layer layer, boolean noBackup)
file
- Output filelayer
- Data layer. Must be an instance of OsmDataLayer
.noBackup
- if true
, the potential backup file created if the output file already exists will be deleted
after a successful exportIllegalArgumentException
- if layer
is not an instance of OsmDataLayer
protected static void checkOsmDataLayer(Layer layer)
protected static OutputStream getOutputStream(File file) throws FileNotFoundException, IOException
FileNotFoundException
IOException
private void save(File file, OsmDataLayer layer, boolean noBackup)
protected void doSave(File file, OsmDataLayer layer) throws IOException, FileNotFoundException
IOException
FileNotFoundException