- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 277 for setBytes (0.48 sec)
-
src/test/java/jcifs/smb/SmbFileOutputStreamTest.java
SmbConstants.O_CREAT | SmbConstants.O_WRONLY | SmbConstants.O_TRUNC, SmbConstants.FILE_WRITE_DATA, SmbConstants.DEFAULT_SHARING); byte[] data1 = "Hello ".getBytes(); byte[] data2 = "World".getBytes(); // When outputStream.write(data1); outputStream.write(data2); // Then - verify two write requests were sent
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/BaseEncodingTest.java
assertThat(encoding.encode(decoded.getBytes(UTF_8))).isEqualTo(encoded); } private static void testEncodesWithOffset( BaseEncoding encoding, String decoded, int offset, int len, String encoded) { assertThat(encoding.encode(decoded.getBytes(UTF_8), offset, len)).isEqualTo(encoded); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 24.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java
testEncryptionKey, testEncryptionKey); // Use same key for test byte[] plaintext = "Hello, SMB3 Encryption!".getBytes(); long sessionId = 0x123456789ABCDEF0L; // When - Encrypt byte[] encrypted = context.encryptMessage(plaintext, sessionId); // Then - Verify encrypted message structure
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 44.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/dfs/DfsReferralResponseBufferTest.java
bb.putShort((short) 24); // altPathOffset bb.putShort((short) 28); // nodeOffset // Add path string at offset 20 (8 + 20 = 28) bb.position(28); bb.put("\\test\0".getBytes(StandardCharsets.UTF_16LE)); int bytesDecoded = buffer.decode(testBuffer, 0, testBuffer.length); assertEquals(42, bytesDecoded); // 8 header + 34 referral
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbFileIntegrationTest.java
// Write initial content try (OutputStream out = file.openOutputStream(false)) { out.write(initialContent.getBytes("UTF-8")); } // Overwrite with new content try (OutputStream out = file.openOutputStream(false)) { out.write(newContent.getBytes("UTF-8")); } // Verify new content try (InputStream in = file.getInputStream()) {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 56K bytes - Viewed (0) -
src/test/java/jcifs/pac/PacMacTest.java
import javax.security.auth.kerberos.KerberosPrincipal; import org.junit.jupiter.api.Test; /** * Tests for the PacMac class. */ class PacMacTest { private static final byte[] TEST_DATA = "test data".getBytes(); private static final KerberosPrincipal TEST_PRINCIPAL = new KerberosPrincipal("test@REALM"); /** * Test method for * {@link jcifs.pac.PacMac#calculateMacArcfourHMACMD5(int, java.security.Key, byte[])}.
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 7.1K bytes - Viewed (0) -
src/test/java/jcifs/pac/kerberos/KerberosAuthDataTest.java
*/ @Test void testParseAuthDataPacWithInvalidToken() { // GIVEN an invalid token for AUTH_DATA_PAC byte[] invalidToken = "invalid-pac-token".getBytes(); // WHEN parsing the auth data // THEN a PACDecodingException should be thrown assertThrows(PACDecodingException.class, () -> {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/SourceSinkFactories.java
@Override public CharSource createSource(String string) throws IOException { return factory.createSource(string.getBytes(UTF_8)).asCharSource(UTF_8); } @Override public String getExpected(String data) { return new String(factory.getExpected(data.getBytes(UTF_8)), UTF_8); } @Override public void tearDown() throws IOException { factory.tearDown();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 17.9K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/Trans2FindFirst2ResponseTest.java
byte[] src = expected.getBytes("UTF-16LE"); String result = response.readString(src, 0, src.length); assertEquals(expected, result); } @Test void testReadString_Oem() { response.useUnicode = false; String expected = "test"; // Simulate OEM encoding with a null terminator byte[] src = (expected + "\0").getBytes(StandardCharsets.UTF_8);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
src/test/java/jcifs/util/transport/TransportTest.java
byte[] data = "Hello World Test".getBytes(); InputStream is = new ByteArrayInputStream(data); byte[] buffer = new byte[20]; int bytesRead = Transport.readn(is, buffer, 0, 5); assertEquals(5, bytesRead); assertArrayEquals("Hello".getBytes(), java.util.Arrays.copyOfRange(buffer, 0, 5)); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.5K bytes - Viewed (0)