/** * WARNING: flush() affects the output format, because it causes the current contents of uncompressedBuffer * to be compressed and written, even if it isn't full. Unless you know what you're doing, don't call flush(). * Instead, call close(), which will flush any unwritten data before closing the underlying stream. * */ @Override public void flush() throws IOException { while (numUncompressedBytes > 0) { deflateBlock(); } codec.getOutputStream().flush(); }
/** * WARNING: flush() affects the output format, because it causes the current contents of uncompressedBuffer * to be compressed and written, even if it isn't full. Unless you know what you're doing, don't call flush(). * Instead, call close(), which will flush any unwritten data before closing the underlying stream. * */ @Override public void flush() throws IOException { while (numUncompressedBytes > 0) { deflateBlock(); } codec.getOutputStream().flush(); }
/** * WARNING: flush() affects the output format, because it causes the current contents of uncompressedBuffer * to be compressed and written, even if it isn't full. Unless you know what you're doing, don't call flush(). * Instead, call close(), which will flush any unwritten data before closing the underlying stream. * */ @Override public void flush() throws IOException { while (numUncompressedBytes > 0) { deflateBlock(); } codec.getOutputStream().flush(); }
@Override public void close(TaskAttemptContext ctx) throws IOException { // Don't close the codec, we don't want BlockCompressedOutputStream's // file terminator to be output. But do flush the stream. binaryCodec.getOutputStream().flush(); // Finish indexer with file length if (splittingBAMIndexer != null) { splittingBAMIndexer.finish(compressedOut.getFilePointer() >> 16); } // And close the original output. origOutput.close(); }
@Override public void close(TaskAttemptContext ctx) throws IOException { // Don't close the codec, we don't want BlockCompressedOutputStream's // file terminator to be output. But do flush the stream. binaryCodec.getOutputStream().flush(); // Finish indexer with file length if (splittingBAMIndexer != null) { splittingBAMIndexer.finish(compressedOut.getFilePointer() >> 16); } // And close the original output. origOutput.close(); }
@Override public void close(TaskAttemptContext ctx) throws IOException { // Don't close the codec, we don't want BlockCompressedOutputStream's // file terminator to be output. But do flush the stream. binaryCodec.getOutputStream().flush(); // Finish indexer with file length if (splittingBAMIndexer != null) { splittingBAMIndexer.finish(compressedOut.getFilePointer() >> 16); } // And close the original output. origOutput.close(); }
private void prepareToWriteAlignments() { if (bamRecordCodec == null) { bamRecordCodec = new BAMRecordCodec(getFileHeader()); bamRecordCodec.setOutputStream(outputBinaryCodec.getOutputStream(), getFilename()); } }
private void prepareToWriteAlignments() { if (bamRecordCodec == null) { bamRecordCodec = new BAMRecordCodec(getFileHeader()); bamRecordCodec.setOutputStream(outputBinaryCodec.getOutputStream(), getFilename()); } }
private void prepareToWriteAlignments() { if (bamRecordCodec == null) { bamRecordCodec = new BAMRecordCodec(getFileHeader()); bamRecordCodec.setOutputStream(outputBinaryCodec.getOutputStream(), getFilename()); } }
codec.getOutputStream().flush(); } catch (final IOException e) { throw new SAMException("IOException in BinaryBAMIndexWriter reference " + content.getReferenceSequence(), e);
codec.getOutputStream().flush(); } catch (final IOException e) { throw new SAMException("IOException in BinaryBAMIndexWriter reference " + content.getReferenceSequence(), e);
codec.getOutputStream().flush(); } catch (final IOException e) { throw new SAMException("IOException in BinaryBAMIndexWriter reference " + content.getReferenceSequence(), e);
codec.getOutputStream().flush(); } catch (final IOException e) { throw new SAMException("IOException in BinaryBAMIndexWriter reference " + content.getReferenceSequence(), e);
codec.getOutputStream().flush(); } catch (final IOException e) { throw new SAMException("IOException in BinaryBAMIndexWriter reference " + content.getReferenceSequence(), e);