public boolean saveAsGeoJSON(File file){
  try {
    FileWriter fw=new FileWriter(file);
    BufferedWriter writer=new BufferedWriter(fw,8192);
    boolean result=saveAsGeoJSON(writer);
    writer.close();
    return result;
  }
 catch (  IOException e) {
    e.printStackTrace();
    return false;
  }
}

public boolean saveAsGeoJSON ( File file ) { try { FileWriter fw = new FileWriter ( file ) ; BufferedWriter writer = new BufferedWriter ( fw , 8192 ) ; boolean result = saveAsGeoJSON ( writer ) ; writer . close ( ) ; return result ; } catch ( IOException e ) { e . printStackTrace ( ) ; return false ; } }
save the document as a geojson file
