Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for terminator (0.07 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/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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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()));
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/smb1/Trans2GetDfsReferralTest.java

            assertEquals(0x12, buffer[1] & 0xFF);
            // Check that the path is written after the referral level
            // The path should be written starting at index 2
            // writeString adds null terminator
            assertTrue(len > 2, "Length should include path");
            String writtenPath = extractStringFromBuffer(buffer, 2, len - 2);
            assertTrue(writtenPath.contains("abc"), "Path should be written to buffer");
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  10. cmd/streaming-v4-unsigned.go

    			if cr.debug {
    				fmt.Println("trailer returned:", err)
    			}
    			if err != nil {
    				cr.err = err
    				return 0, err
    			}
    		}
    		cr.err = io.EOF
    		return n, cr.err
    	}
    	// read final terminator.
    	err = mustRead('\r', '\n')
    	if err != nil && err != io.EOF {
    		cr.err = err
    		return n, cr.err
    	}
    
    	cr.offset = copy(buf, cr.buffer)
    	n += cr.offset
    	return n, err
    }
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Thu Apr 03 14:55:52 UTC 2025
    - 6.3K bytes
    - Viewed (0)
Back to top