- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 63 for toByteArray (0.07 sec)
-
android/guava-tests/test/com/google/common/io/FilesTest.java
File asciiFile = getTestFile("ascii.txt"); File i18nFile = getTestFile("i18n.txt"); assertTrue(Arrays.equals(ASCII.getBytes(US_ASCII), Files.toByteArray(asciiFile))); assertTrue(Arrays.equals(I18N.getBytes(UTF_8), Files.toByteArray(i18nFile))); assertTrue(Arrays.equals(I18N.getBytes(UTF_8), Files.asByteSource(i18nFile).read())); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 22.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FilesTest.java
File asciiFile = getTestFile("ascii.txt"); File i18nFile = getTestFile("i18n.txt"); assertTrue(Arrays.equals(ASCII.getBytes(US_ASCII), Files.toByteArray(asciiFile))); assertTrue(Arrays.equals(I18N.getBytes(UTF_8), Files.toByteArray(i18nFile))); assertTrue(Arrays.equals(I18N.getBytes(UTF_8), Files.asByteSource(i18nFile).read())); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 22.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/PairedStatsTest.java
} public void testToByteArrayAndFromByteArrayRoundTrip() { for (PairedStats pairedStats : ALL_PAIRED_STATS) { byte[] pairedStatsByteArray = pairedStats.toByteArray(); // Round trip to byte array and back assertThat(PairedStats.fromByteArray(pairedStatsByteArray)).isEqualTo(pairedStats); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 03 21:17:33 UTC 2024 - 14K bytes - Viewed (0) -
src/main/java/jcifs/smb/SID.java
return (T) this; } throw new ClassCastException(); } /** * * @return encoded SID */ public byte[] toByteArray () { return toByteArray(this); } /** * * @return whether the SID is empty (no sub-authorities) */ public boolean isEmpty () { return this.sub_authority_count == 0;
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 14.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestTest.kt
assertThat(request.body).isNull() assertThat(request.tags).isEmpty() } @Test fun string() { val contentType = "text/plain; charset=utf-8".toMediaType() val body = "abc".toByteArray().toRequestBody(contentType) assertThat(body.contentType()).isEqualTo(contentType) assertThat(body.contentLength()).isEqualTo(3) assertThat(bodyToHex(body)).isEqualTo("616263")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/BloomFilterTest.java
BloomFilter<byte[]> bf = BloomFilter.create(Funnels.byteArrayFunnel(), 100); for (int i = 0; i < 10; i++) { bf.put(Ints.toByteArray(i)); } BloomFilter<byte[]> copy = SerializableTester.reserialize(bf); for (int i = 0; i < 10; i++) { assertTrue(copy.mightContain(Ints.toByteArray(i))); } assertThat(copy.expectedFpp()).isEqualTo(bf.expectedFpp()); SerializableTester.reserializeAndAssert(bf);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.2K bytes - Viewed (0) -
src/main/java/jcifs/smb/NtlmContext.java
} this.ntlmsspFlags &= msg2.getFlags(); Type3Message msg3 = createType3Message(msg2); msg3.setupMIC(this.type1Bytes, token); byte[] out = msg3.toByteArray(); if ( log.isTraceEnabled() ) { log.trace(msg3.toString()); log.trace(Hexdump.toHexString(token)); }
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Tue Jul 07 12:07:20 UTC 2020 - 15.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/CharsTest.java
.isEqualTo(c); byte[] bytes = Chars.toByteArray(c); assertThat(bytes[0]).isEqualTo((byte) hi); assertThat(bytes[1]).isEqualTo((byte) lo); c++; } } assertThat(c).isEqualTo((char) 0); // sanity check } @GwtIncompatible // Chars.fromByteArray, Chars.toByteArray public void testByteArrayRoundTripsFails() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 25.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTest.java
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteStreams.copy(in, out); in.close(); out.close(); assertTrue(source.wasStreamClosed()); assertArrayEquals(bytes, out.toByteArray()); } public void testSize() throws IOException { assertEquals(bytes.length, source.size()); assertTrue(source.wasStreamOpened() && source.wasStreamClosed());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 15.4K bytes - Viewed (0) -
guava/src/com/google/common/math/PairedStats.java
/** * Gets a byte array representation of this instance. * * <p><b>Note:</b> No guarantees are made regarding stability of the representation between * versions. */ public byte[] toByteArray() { ByteBuffer buffer = ByteBuffer.allocate(BYTES).order(ByteOrder.LITTLE_ENDIAN); xStats.writeTo(buffer); yStats.writeTo(buffer); buffer.putDouble(sumOfProductsOfDeltas); return buffer.array();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 17:02:53 UTC 2023 - 12.6K bytes - Viewed (0)