Home
last modified time | relevance | path

Searched refs:closeable (Results 1 – 20 of 20) sorted by relevance

/external/guava/guava/src/com/google/common/io/
DCloser.java124 public <C extends Closeable> C register(@Nullable C closeable) { in register() argument
125 if (closeable != null) { in register()
126 stack.addFirst(closeable); in register()
129 return closeable; in register()
212 Closeable closeable = stack.removeFirst(); in close() local
214 closeable.close(); in close()
219 suppressor.suppress(closeable, throwable, e); in close()
239 void suppress(Closeable closeable, Throwable thrown, Throwable suppressed); in suppress() argument
250 public void suppress(Closeable closeable, Throwable thrown, Throwable suppressed) { in suppress() argument
253 "Suppressing exception thrown when closing " + closeable, suppressed); in suppress()
[all …]
DCloseables.java73 public static void close(@Nullable Closeable closeable, in close() argument
75 if (closeable == null) { in close()
79 closeable.close(); in close()
108 public static void closeQuietly(@Nullable Closeable closeable) { in closeQuietly() argument
110 close(closeable, true); in closeQuietly()
DLegacyCloseables.java62 public static void closeQuietly(@Nullable Closeable closeable) { in closeQuietly() argument
63 if (closeable == null) { in closeQuietly()
67 closeable.close(); in closeQuietly()
/external/mockito/src/main/java/org/mockito/internal/util/io/
DIOUtil.java53 public static void closeQuietly(Closeable closeable) { in closeQuietly() argument
55 close(closeable); in closeQuietly()
66 public static void close(Closeable closeable) { in close() argument
67 if (closeable != null) { in close()
69 closeable.close(); in close()
71 throw new MockitoException("Problems closing stream: " + closeable, e); in close()
/external/guava/guava-tests/test/com/google/common/io/
DCloseablesTest.java116 private void doClose(Closeable closeable, boolean swallowException) { in doClose() argument
117 doClose(closeable, swallowException, !swallowException); in doClose()
123 private void doClose(Closeable closeable, boolean swallowException, in doClose() argument
126 Closeables.close(closeable, swallowException); in doClose()
135 verify(closeable); in doClose()
DCloserTest.java389 public void suppress(Closeable closeable, Throwable thrown, Throwable suppressed) { in suppress() argument
390 suppressions.add(new Suppression(closeable, thrown, suppressed)); in suppress()
398 private final Closeable closeable; field in CloserTest.Suppression
402 private Suppression(Closeable closeable, Throwable thrown, Throwable suppressed) { in Suppression() argument
403 this.closeable = closeable; in Suppression()
412 return closeable.equals(other.closeable) in equals()
421 return Objects.hashCode(closeable, thrown, suppressed); in hashCode()
427 .add("closeable", closeable) in toString()
/external/libmojo/base/android/java/src/org/chromium/base/
DStreamUtil.java19 public static void closeQuietly(Closeable closeable) { in closeQuietly() argument
20 if (closeable == null) return; in closeQuietly()
23 closeable.close(); in closeQuietly()
/external/conscrypt/libcore-stub/src/main/java/libcore/io/
DIoUtils.java28 public static void closeQuietly(AutoCloseable closeable) { in closeQuietly() argument
29 if (closeable != null) { in closeQuietly()
31 closeable.close(); in closeQuietly()
/external/glide/third_party/disklrucache/src/main/java/com/bumptech/glide/disklrucache/
DUtil.java67 static void closeQuietly(/*Auto*/Closeable closeable) { in closeQuietly() argument
68 if (closeable != null) { in closeQuietly()
70 closeable.close(); in closeQuietly()
/external/jacoco/org.jacoco.agent/src/org/jacoco/agent/
DAgentJar.java116 private static void safeClose(Closeable closeable) { in safeClose() argument
118 if (closeable != null) { in safeClose()
119 closeable.close(); in safeClose()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/
DCertBlacklist.java112 private static void closeQuietly(Closeable closeable) { in closeQuietly() argument
113 if (closeable != null) { in closeQuietly()
115 closeable.close(); in closeQuietly()
/external/conscrypt/platform/src/main/java/org/conscrypt/
DCertBlacklist.java119 private static void closeQuietly(Closeable closeable) { in closeQuietly() argument
120 if (closeable != null) { in closeQuietly()
122 closeable.close(); in closeQuietly()
/external/r8/src/test/examples/multidex002/fakelibrary/
DMultiDexExtractor.java134 private static void closeQuietly(Closeable closeable) { in closeQuietly() argument
136 closeable.close(); in closeQuietly()
/external/r8/src/test/examplesAndroidO/multidex004/fakelibrary/
DMultiDexExtractor.java135 private static void closeQuietly(Closeable closeable) { in closeQuietly() argument
137 closeable.close(); in closeQuietly()
/external/r8/src/test/examples/multidex003/fakelibrary/
DMultiDexExtractor.java134 private static void closeQuietly(Closeable closeable) { in closeQuietly() argument
136 closeable.close(); in closeQuietly()
/external/slf4j/slf4j-nop/src/test/java/org/slf4j/
DInvocationTest.java121 MDC.MDCCloseable closeable = MDC.putCloseable("k", "v"); in testMDCCloseable() local
123 closeable.close(); in testMDCCloseable()
/external/owasp/sanitizer/src/main/org/owasp/html/
DHtmlStreamRenderer.java392 private final Closeable closeable; field in HtmlStreamRenderer.CloseableHtmlStreamRenderer
399 this.closeable = (Closeable) output; in CloseableHtmlStreamRenderer()
404 closeable.close(); in close()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/
DUtil.java68 public static void closeQuietly(Closeable closeable) { in closeQuietly() argument
69 if (closeable != null) { in closeQuietly()
71 closeable.close(); in closeQuietly()
/external/nanohttpd/core/src/main/java/fi/iki/elonen/
DNanoHTTPD.java1765 private static final void safeClose(Object closeable) { in safeClose() argument
1767 if (closeable != null) { in safeClose()
1768 if (closeable instanceof Closeable) { in safeClose()
1769 ((Closeable) closeable).close(); in safeClose()
1770 } else if (closeable instanceof Socket) { in safeClose()
1771 ((Socket) closeable).close(); in safeClose()
1772 } else if (closeable instanceof ServerSocket) { in safeClose()
1773 ((ServerSocket) closeable).close(); in safeClose()
/external/bouncycastle/patches/
Dbcprov.patch8150 + private static void closeQuietly(Closeable closeable) {
8151 + if (closeable != null) {
8153 + closeable.close();