- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for getLength (0.15 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
val result = Relay(randomAccessFile, upstream, 0L, metadata, bufferMaxSize) // Write a dirty header. That way if we crash we won't attempt to recover this. randomAccessFile.setLength(0L) result.writeHeader(PREFIX_DIRTY, -1L, -1L) return result } /** * Creates a relay that reads a recorded stream from [file]. *
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 the unbuffered stream with the value for [index]. */ fun getSource(index: Int): Source = sources[index] /** Returns the byte length of the value for [index]. */ fun getLength(index: Int): Long = lengths[index] override fun close() { for (source in sources) { source.closeQuietly() } } } /** Edits the values for an entry. */
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
} private fun Snapshot.assertValue( index: Int, value: String, ) { getSource(index).use { source -> assertThat(sourceAsString(source)).isEqualTo(value) assertThat(getLength(index)).isEqualTo(value.length.toLong()) } } private fun sourceAsString(source: Source) = source.buffer().readUtf8() private fun Editor.assertInoperable() {
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)