public void close() throws RealmUnavailableException { try { stream.close(); } catch (IOException e) { ElytronMessages.log.debug("Unable to close the stream", e); } } };
public void close() throws RealmUnavailableException { try { if (subIterator != null) subIterator.close(); } finally { try { stream.close(); } catch (IOException e) { ElytronMessages.log.debug("Unable to close the stream", e); } } } };
private void doTestBBEDirectory(Path path) throws RuntimeException { try { File resource = path.toFile(); if (resource.exists()) { if (resource.isFile() && resource.getName().endsWith(".bal")) { doTestBBEFile(resource, null); // If the resource is a directory, recursively test the sub directories/files accordingly. } else if (resource.isDirectory() && !resource.getName().contains("tests")) { DirectoryStream<Path> ds = Files.newDirectoryStream(path); for (Path subPath : ds) { doTestBBEDirectory(subPath); } ds.close(); } } } catch (IOException e) { throw new RuntimeException(e); } }
private void doTestDirectory(Path path) throws RuntimeException { try { File resource = path.toFile(); if (resource.exists()) { if (resource.isFile() && resource.getName().endsWith(".bal")) { if (overwriteExpectedResults) { doOverwrite(resource); } else { doTestFile(resource); } // If the resource is a directory, recursively tests the sub directories/files accordingly, // excluding tests folders. } else if (resource.isDirectory() && !resource.getName().contains("tests")) { DirectoryStream<Path> ds = Files.newDirectoryStream(path); for (Path subPath : ds) { doTestDirectory(subPath); } ds.close(); } } } catch (IOException e) { throw new RuntimeException(e); } }
private void doTestDirectory(Path path) throws RuntimeException { try { File resource = path.toFile(); if (resource.exists()) { if (resource.isFile() && resource.getName().endsWith(myFileExt)) { if (overwriteExpectedResults) { doOverwrite(resource); } else { doTest(resource); } // If the resource is a directory, recursively tests the sub directories/files accordingly, // excluding tests folders. } else if (resource.isDirectory() && !resource.getName().contains("tests")) { DirectoryStream<Path> ds = Files.newDirectoryStream(path); for (Path subPath : ds) { doTestDirectory(subPath); } ds.close(); } } } catch (IOException e) { throw new RuntimeException(e); } }
@AfterClass public static void tearDown() throws IOException { try{ conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } DirectoryStream<Path> dStream = Files.newDirectoryStream(dbDir); Iterator<Path> it = dStream.iterator(); while (it.hasNext()) { Path p = it.next(); Files.delete(p); } dStream.close(); Files.delete(dbDir); }
@Override public void close() throws IOException { ds.close(); } };
public void close() throws IOException { if (debug) System.out.printf("%n"); dirStream.close(); } }
@Override public void close() throws IOException { try { this.delegate.close(); } catch (IOException e) { throw e; } catch (Throwable t) { throw directory.wrapHostException(t); } }
@Override public void close() throws IOException { directoryStream.close(); } };
@Override public void close() throws IOException { directoryStream.close(); } };
@Override public void close() throws IOException { this.wrappedDirectoryStream.close(); } }
public void close() throws IOException { if (debug) System.out.printf(" OK=%d total=%d%n ", count, total); dirStream.close(); } }
public void close() throws IOException { if (debug) System.out.printf(" OK=%d total=%d%n ", count, total); dirStream.close(); } }
private SortedSet<Path> filePaths(Path directory, String extension) throws IOException { SortedSet<Path> sortedFilePaths = new TreeSet<Path>(); DirectoryStream<Path> filePaths = Files.newDirectoryStream(directory, "*" + extension); for (Path filePath : filePaths) { sortedFilePaths.add(filePath); } filePaths.close(); return sortedFilePaths; }
public void close() throws RealmUnavailableException { try { stream.close(); } catch (IOException e) { ElytronMessages.log.debug("Unable to close the stream", e); } } };
public void close() throws RealmUnavailableException { try { stream.close(); } catch (IOException e) { ElytronMessages.log.debug("Unable to close the stream", e); } } };
public void close() throws RealmUnavailableException { try { stream.close(); } catch (IOException e) { ElytronMessages.log.debug("Unable to close the stream", e); } } };
public void close() throws RealmUnavailableException { try { if (subIterator != null) subIterator.close(); } finally { try { stream.close(); } catch (IOException e) { ElytronMessages.log.debug("Unable to close the stream", e); } } } };
public void close() throws RealmUnavailableException { try { if (subIterator != null) subIterator.close(); } finally { try { stream.close(); } catch (IOException e) { ElytronMessages.log.debug("Unable to close the stream", e); } } } };