List of usage examples for java.io Closeable close
public void close() throws IOException;
From source file:org.gridgain.grid.kernal.ggfs.hadoop.GridGgfsHadoopInProc.java
/** {@inheritDoc} */ @Override//www. j a v a 2 s . com public void closeStream(GridGgfsHadoopStreamDelegate desc) throws IOException { Closeable closeable = desc.target(); try { closeable.close(); } catch (IllegalStateException e) { throw new IOException("Failed to close GGFS stream because Grid is stopping.", e); } }
From source file:org.apache.nifi.processors.standard.CompressContent.java
private void closeQuietly(final Closeable closeable) { if (closeable != null) { try {//from ww w.j a v a2 s .c om closeable.close(); } catch (final Exception e) { } } }
From source file:com.nextep.datadesigner.vcs.services.VCSFiles.java
protected void safeClose(Closeable s) { if (s != null) { try {// w ww . j ava 2s. c o m s.close(); } catch (IOException e) { LOGGER.error(VCSMessages.getString("files.streamCloseProblem"), e); //$NON-NLS-1$ } } }
From source file:com.sonymobile.android.media.testmediaplayer.filebrowsing.MediaBrowser.java
private void close(Closeable c) { if (c == null) return;//from w ww . j av a2 s. c o m try { c.close(); } catch (IOException e) { e.printStackTrace(); } }
From source file:be.milieuinfo.core.proxy.controller.ProxyServlet.java
protected void closeQuietly(Closeable closeable) { try {/*from ww w . j a v a2 s .com*/ closeable.close(); } catch (IOException e) { log(e.getMessage(), e); } }
From source file:org.realityforge.proxy_servlet.AbstractProxyServlet.java
private void closeQuietly(final Closeable closeable) { try {//from w w w . jav a 2 s . co m closeable.close(); } catch (final IOException ioe) { log(ioe.getMessage(), ioe); } }
From source file:org.apache.hadoop.hbase.replication.TestMasterReplication.java
private void close(Closeable... closeables) { try {//from w w w .j av a 2 s . c o m if (closeables != null) { for (Closeable closeable : closeables) { closeable.close(); } } } catch (Exception e) { LOG.warn("Exception occured while closing the object:", e); } }
From source file:snoopware.api.ProxyServlet.java
protected void closeQuietly(Closeable closeable) { try {/* w w w. j a v a 2 s .c om*/ closeable.close(); } catch (IOException e) { log(e.getMessage()); } }
From source file:org.ocpsoft.rewrite.servlet.config.proxy.ProxyServlet.java
protected void closeQuietly(Closeable closeable) { try {/*from ww w . j a va 2s .c om*/ closeable.close(); } catch (IOException e) { logger.warn(e.getMessage(), e); } }
From source file:org.opendaylight.controller.yang2sources.plugin.YangToSourcesMojo.java
/** * Internal utility method for closing open resources. *///from w ww . j av a2 s. c om private void closeResources() { for (Closeable resource : resources) { try { resource.close(); } catch (IOException e) { getLog().warn("Failed to close resources: " + resource, e); } } }