- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 336 for getBytes (0.74 sec)
-
src/test/java/jcifs/internal/smb1/trans/TransTransactNamedPipeResponseTest.java
// Test multiple calls to readDataWireFormat to ensure buffer is overwritten byte[] firstData = "First data set".getBytes(); byte[] secondData = "Second data set".getBytes(); byte[] buffer1 = new byte[100]; byte[] buffer2 = new byte[100]; System.arraycopy(firstData, 0, buffer1, 0, firstData.length);Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSinkTest.java
assertTrue(sink.wasStreamClosed()); assertArrayEquals(new byte[] {1, 2, 3, 4}, sink.getBytes()); } public void testWrite_bytes() throws IOException { assertArrayEquals(new byte[0], sink.getBytes()); sink.write(bytes); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); assertArrayEquals(bytes, sink.getBytes()); } public void testWriteFrom_inputStream() throws IOException {Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 3.8K bytes - Viewed (0) -
src/test/java/org/codelibs/curl/io/ContentCacheTest.java
if (tempFile != null && tempFile.exists()) { tempFile.delete(); } } @Test public void testMemoryBasedCacheConstructor() { byte[] data = "Hello, World!".getBytes(); ContentCache cache = new ContentCache(data); assertNotNull(cache); } @Test public void testMemoryBasedCacheConstructorWithNull() { try {
Registered: Sat Dec 20 09:13:53 UTC 2025 - Last Modified: Thu Nov 20 13:34:13 UTC 2025 - 11.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/Fingerprint2011Test.java
assertThat(fingerprint(stringA.getBytes(UTF_8))) .isNotEqualTo(fingerprint(stringB.getBytes(UTF_8))); // ISO 8859-1 only has 0-255 (ubyte) representation so throws away UTF-8 characters // greater than 127 (ie with their top bit set). // Don't attempt to do this in real code. assertEquals( fingerprint(stringA.getBytes(ISO_8859_1)), fingerprint(stringB.getBytes(ISO_8859_1))); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 7.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/CharsetsTest.java
@GwtIncompatible // Non-UTF-8 Charset public void testWhyUsAsciiIsDangerous() { byte[] b1 = "朝日新聞".getBytes(Charsets.US_ASCII); byte[] b2 = "聞朝日新".getBytes(Charsets.US_ASCII); byte[] b3 = "????".getBytes(Charsets.US_ASCII); byte[] b4 = "ニュース".getBytes(Charsets.US_ASCII); byte[] b5 = "スューー".getBytes(Charsets.US_ASCII); // Assert they are all equal (using the transitive property) assertThat(b1).isEqualTo(b2);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:44:53 UTC 2025 - 2.5K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/util/CrawlerWebServer.java
indexFile.deleteOnExit(); FileUtil.writeBytes(indexFile.getAbsolutePath(), content.getBytes("UTF-8")); for (int i = 1; i <= 10; i++) { final File file = new File(dir, "file" + count + "-" + i + ".html"); file.deleteOnExit(); FileUtil.writeBytes(file.getAbsolutePath(), content.getBytes("UTF-8")); final File childDir = new File(dir, "dir" + count + "-" + i);
Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sat Mar 15 06:52:00 UTC 2025 - 6.3K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/entity/ResponseDataTest.java
} public void test_responseBodyBytes() { // Test response body with byte array ResponseData data = new ResponseData(); byte[] content = "Test content".getBytes(StandardCharsets.UTF_8); data.setResponseBody(content); assertTrue(data.hasResponseBody()); assertNotNull(data.getResponseBody()); try (InputStream is = data.getResponseBody()) {Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Thu Nov 13 13:29:22 UTC 2025 - 14.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/fscc/FsctlPipeWaitRequestTest.java
String pipeName = "TestPipe"; FsctlPipeWaitRequest request = new FsctlPipeWaitRequest(pipeName); // Verify size calculation int expectedSize = 14 + pipeName.getBytes(StandardCharsets.UTF_16LE).length; assertEquals(expectedSize, request.size()); } @Test @DisplayName("Test constructor with name and timeout sets correct fields")
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.1K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/client/smb1/SmbClientTest.java
assertEquals("spaces", new String(InputStreamUtil.getBytes(responseData.getResponseBody()))); } try (ResponseData responseData = client.doGet(specialUrl + "file-with-dashes.txt")) { assertEquals(200, responseData.getHttpStatusCode()); assertEquals("dashes", new String(InputStreamUtil.getBytes(responseData.getResponseBody()))); }
Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Tue Sep 23 06:42:59 UTC 2025 - 30K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyResponseTest.java
SMBUtil.writeInt4(1, buffer, notifyOffset + 4); // Action (FILE_ACTION_ADDED) // Write filename in Unicode String fileName = "test.txt"; byte[] fileNameBytes = fileName.getBytes("UnicodeLittleUnmarked"); SMBUtil.writeInt4(fileNameBytes.length, buffer, notifyOffset + 8); // FileNameLength System.arraycopy(fileNameBytes, 0, buffer, notifyOffset + 12, fileNameBytes.length);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 18.8K bytes - Viewed (0)