- Sort Score
- Result 10 results
- Languages All
Results 571 - 580 of 681 for delete (0.07 sec)
-
ThrottledSink.kt
that sleeps [periodDelayNanos] every [bytesPerPeriod] bytes. Unlike [okio.Throttler], L24: * this permits any interval to be used. L25: */ L26:internal class ThrottledSink( L27: private val delegate: Sink, L28: private val bytesPerPeriod: Long, L29: private val periodDelayNanos: Long, L30:) : Sink by delegate { L31: private var bytesWrittenSinceLastDelay = 0L L32: L33: override fun write( L34: source: Buffer, L35: byteCount: Long, L36: ) { L37: var bytesLeft = byteCount L38: L39: ...github.com/square/okhttp/mockwebserver/src/main...Mon Jan 08 01:13:22 UTC 2024 1.5K bytes -
ResponseBodyTest.kt
L135: assertThat(body.bytes()).isEqualTo(text) L136: } L137:} L138: L139:abstract class ForwardingSource( L140: val delegate: Source, L141:) : Source { L142: override fun read( L143: sink: Buffer, L144: byteCount: Long, L145: ): Long = delegate.read(sink, byteCount) L146: L147: override fun timeout() = delegate.timeout() L148: L149: override fun close() = delegate.close() L150:}...github.com/square/okhttp/okhttp/src/test/java/o...Mon Jan 08 01:13:22 UTC 2024 4K bytes -
FileBackedOutputStreamAndroidIncompatibleTest.java
FileBackedOutputStream(0, true); L35: L36: write(out, data, 0, 100, true); L37: final File file = out.getFile(); L38: assertEquals(100, file.length()); L39: assertTrue(file.exists()); L40: out.close(); L41: L42: // Make sure that finalize deletes the file L43: out = null; L44: L45: // times out and throws RuntimeException on failure L46: GcFinalization.awaitDone( L47: new GcFinalization.FinalizationPredicate() { L48: @Override L49: public boolean isDone()...github.com/google/guava/android/guava-tests/tes...Thu Jun 08 21:20:23 UTC 2023 1.7K bytes -
CacheStrategy.kt
ing.maxAgeSeconds.toLong()) L236: } L237: L238: val expires = this.expires L239: if (expires != null) { L240: val servedMillis = servedDate?.time ?: receivedResponseMillis L241: val delta = expires.time - servedMillis L242: return if (delta > 0L) delta else 0L L243: } L244: L245: if (lastModified != null && cacheResponse.request.url.query == null) { L246: // As recommended by the HTTP RFC and implemented in Firefox, the max age of a document L247:...github.com/square/okhttp/okhttp/src/main/kotlin...Mon Apr 15 13:24:48 UTC 2024 12K bytes -
AbstractInvocationHandler.java
delegates to {@link Object#hashCode}. The dynamic proxies' {@code hashCode()} will L120: * delegate to this method. Subclasses can override this method to provide custom equality. L121: */ L122: @Override L123: public int hashCode() { L124: return super.hashCode(); L125: } L126: L127: /** L128: * By default delegates to {@link Object#toString}. The dynamic proxies' {@code toString()} will L129: * delegate to this method. Subclasses can override this method to provide custom string L130: ...github.com/google/guava/guava/src/com/google/co...Wed Jan 05 17:43:40 UTC 2022 5.2K bytes -
FuturesTransformAsyncTest.java
L155: /** Proxy to throw a {@link RuntimeException} out of the {@link #get()} method. */ L156: public static class BadFuture extends SimpleForwardingListenableFuture<Integer> { L157: protected BadFuture(ListenableFuture<Integer> delegate) { L158: super(delegate); L159: } L160: L161: @Override L162: public Integer get() { L163: throw new RuntimeException("Oops"); L164: } L165: } L166:}...github.com/google/guava/android/guava-tests/tes...Fri Oct 18 22:10:29 UTC 2024 6.2K bytes -
FuturesTransformAsyncTest.java
L155: /** Proxy to throw a {@link RuntimeException} out of the {@link #get()} method. */ L156: public static class BadFuture extends SimpleForwardingListenableFuture<Integer> { L157: protected BadFuture(ListenableFuture<Integer> delegate) { L158: super(delegate); L159: } L160: L161: @Override L162: public Integer get() { L163: throw new RuntimeException("Oops"); L164: } L165: } L166:}...github.com/google/guava/guava-tests/test/com/go...Fri Oct 18 22:10:29 UTC 2024 6.2K bytes -
JavaNetCookieJar.kt
conforms to the package-naming limitations of JPMS. L27: * L28: * Callers should prefer to use [okhttp3.java.net.cookiejar.JavaNetCookieJar] directly. L29: */ L30:class JavaNetCookieJar private constructor( L31: delegate: okhttp3.java.net.cookiejar.JavaNetCookieJar, L32:) : CookieJar by delegate { L33: constructor(cookieHandler: CookieHandler) : this( L34: okhttp3.java.net.cookiejar.JavaNetCookieJar( L35: cookieHandler, L36: ), L37: ) L38:}...github.com/square/okhttp/okhttp-urlconnection/s...Mon Jan 08 01:13:22 UTC 2024 1.3K bytes -
AbstractInvocationHandler.java
delegates to {@link Object#hashCode}. The dynamic proxies' {@code hashCode()} will L120: * delegate to this method. Subclasses can override this method to provide custom equality. L121: */ L122: @Override L123: public int hashCode() { L124: return super.hashCode(); L125: } L126: L127: /** L128: * By default delegates to {@link Object#toString}. The dynamic proxies' {@code toString()} will L129: * delegate to this method. Subclasses can override this method to provide custom string L130: ...github.com/google/guava/android/guava/src/com/g...Wed Jan 05 17:43:40 UTC 2022 5.2K bytes -
FaultHidingSink.kt
L19:import okio.Buffer L20:import okio.ForwardingSink L21:import okio.Sink L22: L23:/** A sink that never throws IOExceptions, even if the underlying sink does. */ L24:internal open class FaultHidingSink( L25: delegate: Sink, L26: val onException: (IOException) -> Unit, L27:) : ForwardingSink(delegate) { L28: private var hasErrors = false L29: L30: override fun write( L31: source: Buffer, L32: byteCount: Long, L33: ) { L34: if (hasErrors) { L35: source.skip(byteCount) L36: return...github.com/square/okhttp/okhttp/src/main/kotlin...Mon Jan 08 01:13:22 UTC 2024 1.5K bytes