String localGedcomPath = generatedGigFile.getAbsolutePath();
filename = "file://"+(localGedcomPath.startsWith("/") ? localGedcomPath : "/"+localGedcomPath);
//generatedGigFile = new File(generatedGigFile.getParentFile(), generatedGigFile.getName()+"_toURL");
generatedGigFile = fromURL.getGeneratedGigFileToURL(generatedGigFile);
}
Origin origin = Origin.create(filename, new Handler());
LOG.finest("Generating GIG into file: "+generatedGigFile+" while reading from file: "+origin);
generatedGigFile.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(generatedGigFile);
BufferedOutputStream bos = new BufferedOutputStream(fos);
SniffedInputStream inStream = new SniffedInputStream(origin.open());
//String encoding = inStream.getEncoding();
Charset charset = inStream.getCharset();
if (inStream.getWarning()!=null)
{