- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for readUtf8LineStrict (0.3 sec)
-
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt
} in 8..9 -> { id = source.readUtf8LineStrict().takeIf { it.isNotEmpty() } } in 10..12 -> { id = null // 'id' on a line of its own. } in 13..14 -> { type = source.readUtf8LineStrict().takeIf { it.isNotEmpty() } } in 15..17 -> {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
val urlLine = source.readUtf8LineStrict() // Choice here is between failing with a correct RuntimeException // or mostly silently with an IOException url = urlLine.toHttpUrlOrNull() ?: throw IOException("Cache corruption for $urlLine").also { Platform.get().log("cache corruption", WARN, it) } requestMethod = source.readUtf8LineStrict()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
@Throws(IOException::class) private fun readJournal() { fileSystem.read(journalFile) { val magic = readUtf8LineStrict() val version = readUtf8LineStrict() val appVersionString = readUtf8LineStrict() val valueCountString = readUtf8LineStrict() val blank = readUtf8LineStrict() if (MAGIC != magic || VERSION_1 != version || appVersion.toString() != appVersionString ||
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 34.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http1/HeadersReader.kt
class HeadersReader(val source: BufferedSource) { private var headerLimit = HEADER_LIMIT.toLong() /** Read a single line counted against the header size limit. */ fun readLine(): String { val line = source.readUtf8LineStrict(headerLimit) headerLimit -= line.length.toLong() return line } /** Reads headers or trailers. */ fun readHeaders(): Headers { val result = Headers.Builder() while (true) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
// Read the suffix of the previous chunk. if (bytesRemainingInChunk != NO_CHUNK_YET) { source.readUtf8LineStrict() } try { bytesRemainingInChunk = source.readHexadecimalUnsignedLong() val extensions = source.readUtf8LineStrict().trim() if (bytesRemainingInChunk < 0L || extensions.isNotEmpty() && !extensions.startsWith(";")) { throw ProtocolException(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt
val length = source.readInt() buffer.write(source, length.toLong()) } } while (!buffer.exhausted()) { var publicSuffix = buffer.readUtf8LineStrict() if (publicSuffix.contains("*")) { // A wildcard rule, let's replace the wildcard with a value. publicSuffix = publicSuffix.replace("\\*".toRegex(), "square") }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.3K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
var failure: IOException? = null try { request = source.readUtf8LineStrict() if (request.isEmpty()) { throw ProtocolException("no request because the stream is exhausted") } while (true) { val header = source.readUtf8LineStrict() if (header.isEmpty()) { break } addHeaderLenient(headers, header)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 37.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt
var totalRuleBytes = 0 var totalExceptionRuleBytes = 0 fileSystem.source(publicSuffixListDotDat).buffer().use { source -> while (!source.exhausted()) { var rule: ByteString = source.readUtf8LineStrict().toRule() ?: continue if (rule.startsWith(EXCEPTION_RULE_MARKER)) { rule = rule.substring(1) // We use '\n' for end of value. totalExceptionRuleBytes += rule.size + 1
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 18 01:24:38 UTC 2024 - 6K bytes - Viewed (0)