@Override public void close() throws IOException { data.close(); }
@Override public void close() throws IOException { base.close(); }
@Override public void close() throws IOException { for (int i = 1; i < skipStream.length; i++) { if (skipStream[i] != null) { skipStream[i].close(); } } }
@Override public void close() throws IOException { data.close(); }
@Override public void close() throws IOException { main.close(); }
@Override public void close() throws IOException { dataIn.close(); // Free up heap: readers.clear(); }
/** Returns true if the file exists * (can be opened), false if it cannot be opened, and * (unlike Java's File.exists) throws IOException if * there's some unexpected error. */ static boolean slowFileExists(Directory dir, String fileName) throws IOException { try { dir.openInput(fileName, IOContext.DEFAULT).close(); return true; } catch (NoSuchFileException | FileNotFoundException e) { return false; } }
@Override public void close() throws IOException { try { if (countLeft == 0 && in instanceof ChecksumIndexInput && checked == false) { //System.out.println("NOW CHECK: " + name); checked = true; CodecUtil.checkFooter((ChecksumIndexInput) in); } } finally { in.close(); } }
@Override public void close() throws IOException { input.close(); }
indexIn.close(); success = true; } finally {
/** Closes the underlying IndexInput for this norm. * It is still valid to access all other norm properties after close is called. * @throws IOException */ private synchronized void close() throws IOException { if (in != null && !useSingleNormStream) { in.close(); } in = null; } }
@Override public void close() throws IOException { in.close(); }
@Override public void close() throws IOException { for (int i = 1; i < skipStream.length; i++) { if (skipStream[i] != null) { skipStream[i].close(); } } }
/** * {@inheritDoc} * <p> * Closes the underlying index input. */ public void close() throws IOException { in.close(); } }
void close() throws IOException { // make all effort to close up. Keep the first exception // and throw it as a new one. IOException keep = null; if (tvx != null) try { tvx.close(); } catch (IOException e) { if (keep == null) keep = e; } if (tvd != null) try { tvd.close(); } catch (IOException e) { if (keep == null) keep = e; } if (tvf != null) try { tvf.close(); } catch (IOException e) { if (keep == null) keep = e; } if (keep != null) throw (IOException) keep.fillInStackTrace(); }
@Override public void close() throws IOException { try { if (countLeft == 0 && in instanceof ChecksumIndexInput && checked == false) { //System.out.println("NOW CHECK: " + name); checked = true; CodecUtil.checkFooter((ChecksumIndexInput) in); } } finally { in.close(); } }
@Override public void close() throws IOException { for (IndexInput in : this.clonedInputs) { in.close(); } this.dataInput.close(); }
@Override public void close() throws IOException { delegate.close(); openInputs.remove( IndexInputDelegate.this ); }
private static void readAndAssert(Directory wrapped, String fileName, byte[] expectedData) throws IOException { IndexInput i = wrapped.openInput(fileName, IOContext.DEFAULT); byte[] result = new byte[(int)wrapped.fileLength(fileName)]; i.readBytes(result, 0, result.length); assertTrue(Arrays.equals(expectedData, result)); i.close(); }