- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for NewSource (0.21 sec)
-
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
} @Test fun multipleSources() { val upstream = Buffer() upstream.writeUtf8("abcdefghijklm") val relay = edit(file, upstream, metadata, 1024) val source1 = relay.newSource()!!.buffer() val source2 = relay.newSource()!!.buffer() assertThat(source1.readUtf8()).isEqualTo("abcdefghijklm") assertThat(source2.readUtf8()).isEqualTo("abcdefghijklm") source1.close() source2.close()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
val buffer = Buffer() /** * Reference count of the number of active sources reading this stream. When decremented to 0 * resources are released and all following calls to [.newSource] return null. Guarded by this. */ var sourceCount = 0 val isClosed: Boolean get() = file == null @Throws(IOException::class) private fun writeHeader( prefix: ByteString,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
} } } /** * Returns an unbuffered input stream to read the last committed value, or null if no value has * been committed. */ fun newSource(index: Int): Source? { synchronized(this@DiskLruCache) { check(!done) if (!entry.readable || entry.currentEditor != this || entry.zombie) { return null } return try {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 34.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
setUp(parameters.first, parameters.second) val creator = cache.edit("k1")!! creator.setString(0, "ABC") creator.setString(1, "DE") assertThat(creator.newSource(0)).isNull() assertThat(creator.newSource(1)).isNull() creator.commit() val snapshot = cache["k1"]!! snapshot.assertValue(0, "ABC") snapshot.assertValue(1, "DE") } @ParameterizedTest
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 14:55:09 GMT 2024 - 75.8K bytes - Viewed (0) -
api/go1.txt
pkg math/rand, func Int31n(int32) int32 pkg math/rand, func Int63() int64 pkg math/rand, func Int63n(int64) int64 pkg math/rand, func Intn(int) int pkg math/rand, func New(Source) *Rand pkg math/rand, func NewSource(int64) Source pkg math/rand, func NewZipf(*Rand, float64, float64, uint64) *Zipf pkg math/rand, func NormFloat64() float64 pkg math/rand, func Perm(int) []int pkg math/rand, func Seed(int64)
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Wed Aug 14 18:58:28 GMT 2013 - 1.7M bytes - Viewed (1)