- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 60 for newSink (0.04 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/cache/DiskLruCacheTest.kt
} assertFailsWith<IllegalStateException> { newSink(0) } assertFailsWith<IllegalStateException> { commit() } assertFailsWith<IllegalStateException> { abort() } } private fun Editor.setString( index: Int, value: String, ) { newSink(index).buffer().use { writer -> writer.writeUtf8(value) }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Nov 01 12:18:11 GMT 2025 - 59.4K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt
@Synchronized fun requestCount(): Int = requestCount private inner class RealCacheRequest( private val editor: DiskLruCache.Editor, ) : CacheRequest { private val cacheOut: Sink = editor.newSink(ENTRY_BODY) private val body: Sink var done = false init { this.body = object : ForwardingSink(cacheOut) { @Throws(IOException::class) override fun close() {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Oct 03 17:41:45 GMT 2025 - 26.8K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/DiskLruCache.kt
* output stream encounters errors when writing to the filesystem, this edit will be aborted * when [commit] is called. The returned output stream does not throw IOExceptions. */ fun newSink(index: Int): Sink { synchronized(this@DiskLruCache) { check(!done) if (entry.currentEditor != this) { return blackholeSink() } if (!entry.readable) {Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed May 28 23:28:25 GMT 2025 - 34.7K bytes - Click Count (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/AndroidLog.kt
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Oct 25 11:16:17 GMT 2025 - 4.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/io/LineBufferTest.java
bufferHelper("no newlines at all", "no newlines at all"); bufferHelper("two lines\nbut no newline at end", "two lines\n", "but no newline at end"); bufferHelper( "\nempty first line\nno newline at end", "\n", "empty first line\n", "no newline at end"); bufferHelper("three\rlines\rno newline at end", "three\r", "lines\r", "no newline at end"); bufferHelper("mixed\nline\rendings\r\n", "mixed\n", "line\r", "endings\r\n"); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 4.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/io/LineBufferTest.java
bufferHelper("no newlines at all", "no newlines at all"); bufferHelper("two lines\nbut no newline at end", "two lines\n", "but no newline at end"); bufferHelper( "\nempty first line\nno newline at end", "\n", "empty first line\n", "no newline at end"); bufferHelper("three\rlines\rno newline at end", "three\r", "lines\r", "no newline at end"); bufferHelper("mixed\nline\rendings\r\n", "mixed\n", "line\r", "endings\r\n"); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 4.9K bytes - Click Count (0) -
misc/cgo/gmp/pi.go
//go:build ignore package main import ( big "." "fmt" "runtime" ) var ( tmp1 = big.NewInt(0) tmp2 = big.NewInt(0) numer = big.NewInt(1) accum = big.NewInt(0) denom = big.NewInt(1) ten = big.NewInt(10) ) func extractDigit() int64 { if big.CmpInt(numer, accum) > 0 { return -1 } tmp1.Lsh(numer, 1).Add(tmp1, numer).Add(tmp1, accum)
Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Mon Apr 10 22:32:35 GMT 2023 - 1.3K bytes - Click Count (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt
callback.onRetryChange(retryMs) } } -1 -> { val lineEnd = source.indexOfElement(CRLF) if (lineEnd != -1L) { // Skip the line and newline source.skip(lineEnd) source.select(options) } else { return false // No more newlines. } } else -> throw AssertionError() }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Oct 03 07:51:20 GMT 2025 - 4.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/escape/ArrayBasedUnicodeEscaperTest.java
private static final ImmutableMap<Character, String> NO_REPLACEMENTS = ImmutableMap.of(); private static final ImmutableMap<Character, String> SIMPLE_REPLACEMENTS = ImmutableMap.of( '\n', "<newline>", '\t', "<tab>", '&', "<and>"); private static final char[] NO_CHARS = new char[0]; public void testReplacements() throws IOException {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Feb 18 15:41:04 GMT 2025 - 5.2K bytes - Click Count (0) -
src/bytes/iter.go
import ( "iter" "unicode" "unicode/utf8" ) // Lines returns an iterator over the newline-terminated lines in the byte slice s. // The lines yielded by the iterator include their terminating newlines. // If s is empty, the iterator yields no lines at all. // If s does not end in a newline, the final yielded line will not end in a newline. // It returns a single-use iterator. func Lines(s []byte) iter.Seq[[]byte] {
Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Wed Sep 03 14:04:47 GMT 2025 - 3.6K bytes - Click Count (0)