/** * Write an appropriately named and located Index file based on the name and location of the featureFile. * * Default implementation delegates to {@link #writeBasedOnFeaturePath(Path)} * * @param featureFile * @throws IOException if featureFile is not a normal file. */ public default void writeBasedOnFeatureFile(File featureFile) throws IOException { writeBasedOnFeaturePath(IOUtil.toPath(featureFile)); }
/** * Write an appropriately named and located Index file based on the name and location of the featureFile. * * Default implementation delegates to {@link #writeBasedOnFeaturePath(Path)} * * @param featureFile * @throws IOException if featureFile is not a normal file. */ public default void writeBasedOnFeatureFile(File featureFile) throws IOException { writeBasedOnFeaturePath(IOUtil.toPath(featureFile)); }
/** * attempt to close the VCF file */ @Override public void close() { try { // close the underlying output stream outputStream.close(); // close the index stream (keep it separate to help debugging efforts) if (indexer != null) { indexer.setIndexSequenceDictionary(refDict); final Index index = indexer.finalizeIndex(locationSource.getPosition()); index.writeBasedOnFeaturePath(location); } } catch (final IOException e) { throw new RuntimeIOException("Unable to close index for " + getStreamName(), e); } }
/** * attempt to close the VCF file */ @Override public void close() { try { // close the underlying output stream outputStream.close(); // close the index stream (keep it separate to help debugging efforts) if (indexer != null) { indexer.setIndexSequenceDictionary(refDict); final Index index = indexer.finalizeIndex(locationSource.getPosition()); index.writeBasedOnFeaturePath(location); } } catch (final IOException e) { throw new RuntimeIOException("Unable to close index for " + getStreamName(), e); } }