- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for readByte (0.06 sec)
-
okhttp/src/test/java/okhttp3/SocksProxy.kt
// Read the command. val version = fromSource.readByte() and 0xff if (version != VERSION_5) throw ProtocolException("unexpected version: $version") val command = fromSource.readByte() and 0xff val reserved = fromSource.readByte() and 0xff if (reserved != 0) throw ProtocolException("unexpected reserved: $reserved") val addressType = fromSource.readByte() and 0xff val toAddress =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
@Test fun sourceSeesBom() { val body = "efbbbf68656c6c6f".decodeHex().toResponseBody() val source = body.source() assertThat(source.readByte() and 0xff).isEqualTo(0xef) assertThat(source.readByte() and 0xff).isEqualTo(0xbb) assertThat(source.readByte() and 0xff).isEqualTo(0xbf) assertThat(source.readUtf8()).isEqualTo("hello") } @Test fun bytesEmpty() { val body = body("")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 13K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt
val length = source.readMedium() if (length > INITIAL_MAX_FRAME_SIZE) { throw IOException("FRAME_SIZE_ERROR: $length") } val type = source.readByte() and 0xff val flags = source.readByte() and 0xff val streamId = source.readInt() and 0x7fffffff // Ignore reserved bit. if (type != TYPE_WINDOW_UPDATE && logger.isLoggable(FINE)) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 19.9K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt
} var lengthBits = source.readByte().toLong() and 0xff if (lengthBits == 0L || lengthBytes == 1 && lengthBits and 0b1000_0000 == 0L) { throw ProtocolException("invalid encoding for length") } for (i in 1 until lengthBytes) { lengthBits = lengthBits shl 8 lengthBits += source.readByte().toInt() and 0xff }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
src/bytes/buffer_test.go
} // after successful read if _, err := b.ReadBytes('m'); err != nil { t.Fatalf("ReadBytes: %v", err) } if err := b.UnreadByte(); err != nil { t.Fatalf("UnreadByte: %v", err) } c, err := b.ReadByte() if err != nil { t.Fatalf("ReadByte: %v", err) } if c != 'm' { t.Errorf("ReadByte = %q; want %q", c, 'm') } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt
fun writeObjectIdentifier(s: String) { val utf8 = Buffer().writeUtf8(s) val v1 = utf8.readDecimalLong() require(utf8.readByte() == '.'.code.toByte()) val v2 = utf8.readDecimalLong() writeVariableLengthLong(v1 * 40 + v2) while (!utf8.exhausted()) { require(utf8.readByte() == '.'.code.toByte()) val vN = utf8.readDecimalLong() writeVariableLengthLong(vN) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt
// 0 - 63 bytes var length = source.readByte().toInt() if (length < 0) { // compressed name pointer, first two bits are 1 // drop second byte of compression offset source.skip(1) } else { while (length > 0) { // skip each part of the domain name source.skip(length.toLong()) length = source.readByte().toInt() } } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.8K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer_test.go
n, err := rb.Read(buf[:readRng.Intn(len(buf))]) readBytes += n read.Write(buf[:n]) debugln("READ 1\t", n, readBytes) if err != nil { readErr = err break } // ReadByte b, err := rb.ReadByte() if err != nil { readErr = err break } readBytes++ read.Write([]byte{b}) debugln("READ 2\t", 1, readBytes) // TryRead
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 26.8K bytes - Viewed (0) -
src/bytes/reader.go
n = copy(b, r.s[off:]) if n < len(b) { err = io.EOF } return } // ReadByte implements the [io.ByteReader] interface. func (r *Reader) ReadByte() (byte, error) { r.prevRune = -1 if r.i >= int64(len(r.s)) { return 0, io.EOF } b := r.s[r.i] r.i++ return b, nil } // UnreadByte complements [Reader.ReadByte] in implementing the [io.ByteScanner] interface. func (r *Reader) UnreadByte() error {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Jul 16 18:17:37 UTC 2024 - 3.9K bytes - Viewed (0)