@Override public void close() throws IOException { stream.close(); } }
@Override public void close() throws IOException { stream.close(); } }
public void close() { if(mFp != null) { try { mFp.close(); } catch (IOException e) { } } }
@Override public void close() throws IOException { input.close(); } }
public void close() { if(mFp != null) { try { mFp.close(); } catch (IOException e) { } } }
@Override public void close() throws IOException { input.close(); } }
public void close() { if(mFp != null) { try { mFp.close(); } catch (IOException e) { } } }
@Override public void close() throws IOException { input.close(); } }
@Override public void close() throws IOException { bgzf.close(); }
@Override public void close() throws IOException { bgzf.close(); }
@Override public void close() throws IOException { bgzf.close(); }
public void close() { if (fileInputStream != null) { try { fileInputStream.close(); } catch (IOException e) { throw new RuntimeException(e); } fileInputStream = null; } }
public void close() { if(validatingInputStream != null) { try { validatingInputStream.close(); } catch(IOException ex) { throw new ReviewedGATKException("Unable to validate against Picard input stream",ex); } } }
@Override public void close() throws IOException { async.disableAsyncProcessing(); super.close(); }
@Override public void close() throws IOException { // Suppress interrupts while we close. final boolean isInterrupted = Thread.interrupted(); mAbort = true; try { flushReadAhead(); super.close(); } finally { if (isInterrupted) Thread.currentThread().interrupt(); } } /**
@Override public void close() throws IOException { // Suppress interrupts while we close. final boolean isInterrupted = Thread.interrupted(); mAbort = true; try { flushReadAhead(); super.close(); } finally { if (isInterrupted) Thread.currentThread().interrupt(); } } /**
@Override public void close() { if (mCompressedStream == null) { throw new SAMException("Null input stream."); } try { mCompressedStream.close(); } catch (IOException ioe) { throw(new RuntimeIOException("Close error in CSI compressed stream: " + ioe)); } }
@Override public boolean canRead(File file) { final byte[] BAM_MAGIC = "BAM\1".getBytes(); final byte[] buffer = new byte[BAM_MAGIC.length]; try { InputStream fstream = new BufferedInputStream(new FileInputStream(file)); if ( !BlockCompressedInputStream.isValidFile(fstream) ) return false; final BlockCompressedInputStream BCIS = new BlockCompressedInputStream(fstream); BCIS.read(buffer, 0, BAM_MAGIC.length); BCIS.close(); return Arrays.equals(buffer, BAM_MAGIC); } catch ( IOException e ) { return false; } catch ( htsjdk.samtools.FileTruncatedException e ) { return false; } } }
public int execute() throws IOException { final byte[] uncompressedBuffer = new byte[65536]; final BlockCompressedInputStream gunzipper = new BlockCompressedInputStream(blockFile); gunzipper.setCheckCrcs(true); gunzipper.read(uncompressedBuffer); gunzipper.close(); System.out.printf("SUCCESS!%n"); return 0; }
@Test public void testFilePointer() throws Exception { BlockCompressedInputStream sync = new BlockCompressedInputStream(BAM_FILE); Assert.assertEquals(sync.getFilePointer(), 0); sync.close(); } }