Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 207 for terminator (0.06 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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: 1
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  8. 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)
  9. src/test/java/jcifs/internal/smb1/com/SmbComCreateDirectoryTest.java

            // Expected format: buffer format (0x04) + path string (null terminated)
            byte[] expected = new byte[directoryName.length() + 2];
            expected[0] = 0x04; // Buffer format
            System.arraycopy(directoryName.getBytes(StandardCharsets.UTF_8), 0, expected, 1, directoryName.length());
            expected[directoryName.length() + 1] = 0x00; // Null terminator
    
            byte[] dst = new byte[100];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/dfs/DfsReferralRequestBuffer.java

            System.arraycopy(pathBytes, 0, dst, dstIndex, pathBytes.length);
            dstIndex += pathBytes.length;
            SMBUtil.writeInt2(0, dst, dstIndex);
            dstIndex += 2; // null terminator
            return dstIndex - start;
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.3K bytes
    - Viewed (0)
Back to top