- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 155 for terminator (0.16 sec)
-
src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java
assertEquals(0x04, buffer[0] & 0xFF, "First byte must be SMB_COM_QUERY_INFORMATION type 0x04"); // Verify that the string part ends with the null terminator assertArrayEquals(expectedString, subArray(buffer, 1, expectedString.length)); assertEquals(0, buffer[1 + expectedString.length], "String must be null terminated"); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.9K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbComNegotiateResponseTest.java
buffer.put(domainNameBytes); buffer.put((byte) 0x00); // Null terminator byte[] byteData = buffer.array(); // Call the method int bytesRead = response.readBytesWireFormat(byteData, 0); // Assertions // readBytesWireFormat returns bytes processed up to null terminator assertEquals(14, bytesRead); // 8 bytes key + 6 bytes domain name
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.2K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbComDeleteDirectoryTest.java
sdd.useUnicode = false; // format byte + path + null terminator byte[] expected = new byte[1 + dirName.length() + 1]; expected[0] = 0x04; // buffer format System.arraycopy(dirName.getBytes(), 0, expected, 1, dirName.length()); expected[dirName.length() + 1] = 0x00; // null terminator byte[] dst = new byte[100]; int len = sdd.writeBytesWireFormat(dst, 0);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/ServerMessageBlockTest.java
byte[] buffer = new byte[100]; // Create "Test\0" in UTF-16LE with proper null terminator byte[] testBytes = Strings.getUNIBytes("Test"); System.arraycopy(testBytes, 0, buffer, 0, 8); buffer[8] = 0; // null terminator low byte buffer[9] = 0; // null terminator high byte String result = testBlock.readString(buffer, 0, buffer.length, 8, true);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 36.2K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/Trans2QueryPathInformationTest.java
assertEquals(filenameBytes[i], dst[6 + i], "Filename byte at index " + i + " should match."); } // Check null terminator assertEquals((byte) 0x00, dst[dst.length - 1], "The last byte should be a null terminator."); } /** * Tests the writeDataWireFormat method. */ @Test void testWriteDataWireFormat() { // Given
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/net/NetShareEnumResponseTest.java
buffer[10 + stringBytes.length] = 0; // null terminator // Use reflection to call protected readString method Method readStringMethod = getReadStringMethod(); String result = (String) readStringMethod.invoke(response, buffer, 10, 128, false); assertEquals(testString, result); } @Test @DisplayName("Test readString with null terminator in middle")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.2K bytes - Viewed (0) -
src/main/java/jcifs/internal/witness/WitnessRegisterMessage.java
buf.enc_ndr_long(charCount + 1); // MaximumCount (including null terminator) buf.enc_ndr_long(0); // Offset buf.enc_ndr_long(charCount + 1); // ActualCount (including null terminator) // String data in UTF-16LE buf.writeOctetArray(wideBytes, 0, wideBytes.length); buf.enc_ndr_short(0); // Wide null terminator // Pad to 4-byte boundary
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 23 09:06:40 UTC 2025 - 8.6K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/Trans2FindFirst2ResponseTest.java
response.useUnicode = false; String expected = "test"; // Simulate OEM encoding with a null terminator byte[] src = (expected + "\0").getBytes(StandardCharsets.UTF_8); String result = response.readString(src, 0, src.length); // The method should remove the null terminator assertEquals(expected, result.substring(0, expected.length())); } @TestRegistered: 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/internal/smb1/trans2/Trans2GetDfsReferralResponseTest.java
String testPath = "\\server\\share"; byte[] pathBytes = testPath.getBytes(java.nio.charset.StandardCharsets.UTF_16LE); int bufferSize = stringDataStart + pathBytes.length + 2; // +2 for null terminator byte[] buffer = new byte[bufferSize]; // Path consumed (2 bytes) - value: 10 * 2 = 20 SMBUtil.writeInt2(20, buffer, 0); // Number of referrals (2 bytes) - value: 1Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 19.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComRenameTest.java
assertEquals((byte) 0x04, dst[0]); // First buffer format byte // Find the second buffer format byte int secondBufferFormatIndex = oldFileName.length() + 2; // 1 for first 0x04, 1 for null terminator assertEquals((byte) 0x04, dst[secondBufferFormatIndex]); } /** * Test writeBytesWireFormat with Unicode encoding */ @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0)