- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 93 for toByteArray (0.38 sec)
-
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")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 16.4K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
.build(), ) val startNanos = System.nanoTime() val connection = server.url("/").toUrl().openConnection() connection.doOutput = true connection.getOutputStream().write("ABCDEF".toByteArray(UTF_8)) val inputStream = connection.getInputStream() assertThat(inputStream.read()).isEqualTo(-1) val elapsedNanos = System.nanoTime() - startNanos
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 23.5K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/timer/MonitorTarget.java
exception.printStackTrace(writer); writer.flush(); append(buf, "exception", () -> StringEscapeUtils.escapeJson(new String(baos.toByteArray(), Constants.CHARSET_UTF_8))); } catch (final IOException e) { append(buf, "exception", () -> StringEscapeUtils.escapeJson(e.getMessage())); } return buf; }
Java - Registered: Mon May 06 08:04:11 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/IntsTest.java
.isEqualTo(new int[] {(int) 1, (int) 2, (int) 3, (int) 4}); } public void testToByteArray() { assertThat(Ints.toByteArray(0x12131415)).isEqualTo(new byte[] {0x12, 0x13, 0x14, 0x15}); assertThat(Ints.toByteArray(0xFFEEDDCC)) .isEqualTo(new byte[] {(byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC}); } public void testFromByteArray() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 06 16:10:08 GMT 2024 - 28.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt
assertThat(data1.type).isEqualTo(Http2.TYPE_DATA) assertThat(data1.streamId).isEqualTo(3) assertArrayEquals("abcde".toByteArray(), data1.data) val data2 = peer.takeFrame() assertThat(data2.type).isEqualTo(Http2.TYPE_DATA) assertThat(data2.streamId).isEqualTo(3) assertArrayEquals("fghi".toByteArray(), data2.data) } /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 75.4K bytes - Viewed (0) -
android/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();
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri May 12 17:02:53 GMT 2023 - 12.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
out.write(b); } @Override protected void update(byte[] b, int off, int len) { out.write(b, off, len); } byte[] bytes() { return out.toByteArray(); } void assertBytes(byte[] expected) { assertArrayEquals(expected, bytes()); } @Override public HashCode hash() { return HashCode.fromBytesNoCopy(bytes());
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.8K bytes - Viewed (0) -
android/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());
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/SerializeUtil.java
final ObjectOutputStream oos = new ObjectOutputStream(baos); try { oos.writeObject(obj); } finally { oos.close(); } return baos.toByteArray(); } catch (final IOException ex) { throw new IORuntimeException(ex); } } /** * {@literal byte}の配列をオブジェクトに変換します。 * * @param bytes
Java - Registered: Fri May 03 20:58:11 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 3.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
out.write(b); } @Override protected void update(byte[] b, int off, int len) { out.write(b, off, len); } byte[] bytes() { return out.toByteArray(); } void assertBytes(byte[] expected) { assertArrayEquals(expected, bytes()); } @Override public HashCode hash() { return HashCode.fromBytesNoCopy(bytes());
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.8K bytes - Viewed (0)