- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 64 for close (0.13 sec)
-
android/guava/src/com/google/common/io/Closer.java
@VisibleForTesting Closer(Suppressor suppressor) { this.suppressor = checkNotNull(suppressor); // checkNotNull to satisfy null tests } /** * Registers the given {@code closeable} to be closed when this {@code Closer} is {@linkplain * #close closed}. * * @return the given {@code closeable} */ // close. this word no longer has any meaning to me.
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Mar 06 15:15:46 GMT 2024 - 11.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/CloserTest.java
Closer closer = new Closer(suppressor); IOException exception = new IOException(); // c2 is added last, closed first TestCloseable c1 = closer.register(TestCloseable.normal()); TestCloseable c2 = closer.register(TestCloseable.throwsOnClose(exception)); try { closer.close(); } catch (Throwable expected) {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Mar 06 15:15:46 GMT 2024 - 13.6K bytes - Viewed (0) -
android/guava/src/com/google/common/io/FileBackedOutputStream.java
} } /** * Calls {@link #close} if not already closed, and then resets this object back to its initial * state, for reuse. If data was buffered to a file, it will be deleted. * * @throws IOException if an I/O error occurred while deleting the file buffer */ public synchronized void reset() throws IOException { try { close(); } finally { if (memory == null) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 8.2K bytes - Viewed (0) -
android/guava/src/com/google/common/io/BaseEncoding.java
return read == 0 ? -1 : read; } buf[i] = (byte) b; } return i - off; } @Override public void close() throws IOException { reader.close(); } }; } @Override public BaseEncoding omitPadding() { return (paddingChar == null) ? this : newInstance(alphabet, null); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Mar 15 16:33:32 GMT 2024 - 41.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/StreamsTest.java
.flatMap(x -> x); assertThat(concatenated).containsExactly("a", "b", "c", "d").inOrder(); concatenated.close(); // even without close, see doc for flatMap assertThat(closeCountB.get()).isEqualTo(1); } public void testConcat_refStream_closeIsPropagated_exceptionsChained() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 20K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ClosingFuture.java
if (compareAndUpdateState(OPEN, WILL_CLOSE)) { logger.get().log(FINER, "will close {0}", this); future.addListener( new Runnable() { @Override public void run() { checkAndUpdateState(WILL_CLOSE, CLOSING); close(); checkAndUpdateState(CLOSING, CLOSED); } },
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 98.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java
} } // Avoid infinite recursion if a closeable's close() method throws RejectedExecutionException and // is closed using the direct executor. public void testCloseThrowsRejectedExecutionException() throws Exception { doThrow(new RejectedExecutionException()).when(mockCloseable).close(); ClosingFuture<Closeable> closingFuture = ClosingFuture.submit(
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 75.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java
} } // Avoid infinite recursion if a closeable's close() method throws RejectedExecutionException and // is closed using the direct executor. public void testCloseThrowsRejectedExecutionException() throws Exception { doThrow(new RejectedExecutionException()).when(mockCloseable).close(); ClosingFuture<Closeable> closingFuture = ClosingFuture.submit(
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 74.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
oos.writeObject(o); oos.flush(); oos.close(); ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); T clone = (T) ois.readObject(); assertSame(o.getClass(), clone.getClass()); return clone; } catch (Throwable t) { threadUnexpectedException(t); return null; } }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 37.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableList.java
* Builder#build} is called, the builder is likely to perform better than an unsized {@link * #builder()} would have. * * <p>It is not specified if any performance benefits apply if {@code expectedSize} is close to, * but not exactly, the number of elements added to the builder. * * @since 23.1 */ public static <E> Builder<E> builderWithExpectedSize(int expectedSize) {
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 30K bytes - Viewed (1)