- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for FileOperator (0.07 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/cache2/FileOperator.kt
* * **Shared channels:** read and write a file channel that's shared between * multiple operators. Note that although the underlying [FileChannel] may be shared, * each [FileOperator] should not be. */ internal class FileOperator( private val fileChannel: FileChannel, ) { /** Write [byteCount] bytes from [source] to the file at [pos]. */ @Throws(IOException::class) fun write( pos: Long,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
} val fileOperator = FileOperator(file!!.channel) fileOperator.write(0, header, FILE_HEADER_SIZE) } @Throws(IOException::class) private fun writeMetadata(upstreamSize: Long) { val metadataBuffer = Buffer() metadataBuffer.write(metadata) val fileOperator = FileOperator(file!!.channel)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt
val operator = FileOperator( randomAccessFile!!.getChannel(), ) val buffer = Buffer() operator.read(0, buffer, 5) assertThat(buffer.readUtf8()).isEqualTo("Hello") operator.read(4, buffer, 5) assertThat(buffer.readUtf8()).isEqualTo("o, Wo") } @Test fun write() { val operator = FileOperator( randomAccessFile!!.getChannel(), )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.8K bytes - Viewed (0)