Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for setLength (0.21 sec)

  1. 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)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

            fileBuilder.append(".tmp")
            dirtyFiles += directory / fileBuilder.toString()
            fileBuilder.setLength(truncateTo)
          }
        }
    
        /** Set lengths using decimal numbers like "10123". */
        @Throws(IOException::class)
        internal fun setLengths(strings: List<String>) {
          if (strings.size != valueCount) {
            invalidLengths(strings)
          }
    
          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)
  3. 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)
Back to top