- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 125 for terminator (0.22 sec)
-
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/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/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) -
src/test/java/jcifs/internal/dfs/DfsReferralRequestBufferTest.java
buffer = new DfsReferralRequestBuffer(path, maxReferralLevel); assertNotNull(buffer); assertEquals(4, buffer.size()); // 2 bytes for level + 2 bytes for null terminator } @Test @DisplayName("Should create buffer with null path") void testConstructorWithNullPath() { String path = null; int maxReferralLevel = 2;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComNegotiateResponseTest.java
response.getServerData().scapabilities = 0; response.getServerData().encryptionKeyLength = 8; // Domain name in OEM encoding (ASCII) with null terminator byte[] domainBytes = "DOMAIN\0".getBytes("US-ASCII"); // Use reflection to set protected byteCount field int byteCountValue = 8 + domainBytes.length; setByteCount(response, byteCountValue);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/net/NetServerEnum2ResponseTest.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 - 25.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) -
src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java
smb.useUnicode = false; byte[] buffer = new byte[6]; System.arraycopy("short".getBytes(), 0, buffer, 0, 5); buffer[5] = 0; // Null terminator String result = smb.readString(buffer, 0, 5, false); assertEquals("short", result); } @Test void testReadStringWithMaxLengthExceeded() { smb.useUnicode = false;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.9K bytes - Viewed (0) -
src/main/java/jcifs/internal/witness/WitnessAsyncNotifyMessage.java
return ""; } // Read wide string data (UTF-16LE) int byteCount = (actualCount - 1) * 2; // Exclude null terminator byte[] wideBytes = new byte[byteCount]; buf.readOctetArray(wideBytes, 0, byteCount); // Skip null terminator buf.dec_ndr_short(); // Skip padding int padding = (4 - ((byteCount + 2) % 4)) % 4;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 24 00:12:28 UTC 2025 - 16.4K bytes - Viewed (0) -
src/test/java/jcifs/ntlmssp/Type1MessageTest.java
assertEquals('S', messageBytes[4]); assertEquals('S', messageBytes[5]); assertEquals('P', messageBytes[6]); assertEquals(0, messageBytes[7]); // Null terminator } @Test @DisplayName("Should include message type indicator") void testMessageTypeIndicator() throws IOException { // When Type1Message type1 = new Type1Message(mockContext);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.1K bytes - Viewed (0)