- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 119 for toBytes (0.29 sec)
-
platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/BaseSerializerFactoryTest.groovy
} def "uses efficient serialization for Paths"() { expect: def serializer = factory.getSerializerFor(Path) def encoded = toBytes(Paths.get("some-file"), serializer) fromBytes(encoded, serializer) == Paths.get("some-file") encoded.length == 10 } def "uses efficient serialization for Long"() { expect:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Apr 15 16:06:56 UTC 2024 - 2.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go
t.Parallel() // needs to be large to force allocations so we pick a random value between [1024, 2048] size := utilrand.IntnRange(1024, 2048+1) t.Run("toBytes semantics", func(t *testing.T) { t.Parallel() s := utilrand.String(size) b := toBytes(s) if len(b) != size { t.Errorf("unexpected length: %d", len(b)) } if cap(b) != size { t.Errorf("unexpected capacity: %d", cap(b)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 20.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope.go
b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) { b.AddBytes(toBytes(k)) }) b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) { b.AddBytes(annotations[k]) }) } return b.Bytes() } // toBytes performs unholy acts to avoid allocations func toBytes(s string) []byte { // unsafe.StringData is unspecified for the empty string, so we provide a strict interpretation
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 27 00:23:50 UTC 2023 - 18.7K bytes - Viewed (0) -
src/crypto/internal/nistec/fiat/generate.go
{{ .Prefix }}SetOne(&e.x) return e } // Equal returns 1 if e == t, and zero otherwise. func (e *{{ .Element }}) Equal(t *{{ .Element }}) int { eBytes := e.Bytes() tBytes := t.Bytes() return subtle.ConstantTimeCompare(eBytes, tBytes) } // IsZero returns 1 if e == 0, and zero otherwise. func (e *{{ .Element }}) IsZero() int { zero := make([]byte, {{ .Prefix }}ElementLen) eBytes := e.Bytes()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 12 00:04:29 UTC 2022 - 9.1K bytes - Viewed (0) -
pkg/kubelet/stats/cri_stats_provider_windows_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Feb 17 00:02:10 UTC 2024 - 13.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/HostnamesTest.kt
byteArrayOf(192.toByte(), 168.toByte(), 0, 1), ), ).isEqualTo("192.168.0.1") assertThat( inet4AddressToAscii( byteArrayOf(252.toByte(), 253.toByte(), 254.toByte(), 255.toByte()), ), ).isEqualTo("252.253.254.255") assertThat( inet4AddressToAscii( byteArrayOf(255.toByte(), 255.toByte(), 255.toByte(), 255.toByte()), ),
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Tue Jan 30 06:23:33 UTC 2024 - 5.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt
private fun Buffer.skipCommasAndWhitespace(): Boolean { var commaFound = false loop@ while (!exhausted()) { when (this[0]) { ','.code.toByte() -> { // Consume ','. readByte() commaFound = true } ' '.code.toByte(), '\t'.code.toByte() -> { readByte() // Consume space or tab. } else -> break@loop } } return commaFound
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
src/main/java/org/codelibs/core/convert/ByteConversionUtil.java
* @return 変換された{@link Byte} */ public static Byte toByte(final Object o) { return toByte(o, null); } /** * {@link Byte}に変換します。 * * @param o * 変換元のオブジェクト * @param pattern * パターン文字列 * @return 変換された{@link Byte} */ public static Byte toByte(final Object o, final String pattern) { if (o == null) {
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 3.7K bytes - Viewed (0) -
okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt
internal const val TYPE_VALID = 6 private fun BufferedSource.skipWhitespace() { while (!exhausted()) { if (buffer[0] != ' '.code.toByte()) return skip(1L) } } private fun BufferedSource.skipRestOfLine() { when (val newline = indexOf('\n'.code.toByte())) { -1L -> skip(buffer.size) // Exhaust this source. else -> skip(newline + 1) } } /**
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.8K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt
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: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0)