Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for useUnicode (1.38 sec)

  1. 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)
  2. src/main/java/jcifs/internal/smb1/com/SmbComNegotiateResponse.java

                    this.useUnicode = true;
                } else {
                    this.useUnicode = false;
                    this.negotiatedFlags2 &= 0xFFFF ^ SmbConstants.FLAGS2_UNICODE;
                }
            } else {
                this.useUnicode = ctx.getConfig().isUseUnicode();
            }
    
            if (this.useUnicode) {
                log.debug("Unicode is enabled");
            } else {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  3. src/test/java/jcifs/SmbConnectionTest.java

        public void testBatchLimitForDifferentCommands() throws CIFSException {
            Properties props = new Properties();
            props.setProperty("jcifs.smb.client.useBatching", "true");
            props.setProperty("jcifs.smb.client.useUnicode", "true");
    
            PropertyConfiguration config = new PropertyConfiguration(props);
    
            // Test various command batch limits
            int readAndXClose = config.getBatchLimit("ReadAndX.Close");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/SmbComOpenAndXTest.java

         * Test writeBytesWireFormat method with Unicode.
         */
        @Test
        void testWriteBytesWireFormat_Unicode() {
            smbComOpenAndX = new SmbComOpenAndX(fileName, access, 0, andx);
            smbComOpenAndX.useUnicode = true;
            // For Unicode: 1 byte (initial null in writeBytesWireFormat)
            // + potential 1 byte alignment (in writeString) + fileName.length() * 2 + 2 bytes (terminating nulls)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/ServerMessageBlock.java

        int writeString(final String str, final byte[] dst, final int dstIndex) {
            return writeString(str, dst, dstIndex, useUnicode);
        }
    
        int writeString(final String str, final byte[] dst, int dstIndex, final boolean useUnicode) {
            final int start = dstIndex;
    
            try {
                if (useUnicode) {
                    // Unicode requires word alignment
                    if ((dstIndex - headerStart) % 2 != 0) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/smb1/SmbComSessionSetupAndXResponse.java

            nativeLanMan = readString(buffer, bufferIndex, start + byteCount, 255, useUnicode);
            bufferIndex += stringWireLength(nativeLanMan, bufferIndex);
            if (!extendedSecurity) {
                primaryDomain = readString(buffer, bufferIndex, start + byteCount, 255, useUnicode);
                bufferIndex += stringWireLength(primaryDomain, bufferIndex);
            }
    
            return bufferIndex - start;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/smb1/Trans2FindFirst2ResponseTest.java

            response.useUnicode = true;
            String expected = "test";
            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";
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/smb1/SmbComSessionSetupAndX.java

                        }
                    } else if (DISABLE_PLAIN_TEXT_PASSWORDS) {
                        throw new RuntimeException("Plain text passwords are disabled");
                    } else if (useUnicode) {
                        // plain text
                        final String password = auth.getPassword();
                        lmHash = new byte[0];
                        ntHash = new byte[(password.length() + 1) * 2];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/smb1/AndXServerMessageBlockTest.java

            assertTrue(next.writeParamCalls > 0, "chained SMB parameter words should be written");
            assertTrue(next.writeBytesCalls > 0, "chained SMB bytes should be written");
        }
    
        @Test
        @DisplayName("decode basic AndX block with no chaining")
        void testDecodeBasicNoAndx() {
            DummyAndXBlock block = new DummyAndXBlock() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/smb1/AndXServerMessageBlock.java

            dst[start + ANDX_RESERVED_OFFSET] = (byte) 0x00;
            andxOffset = dstIndex - headerStart;
            writeInt2(andxOffset, dst, start + ANDX_OFFSET_OFFSET);
    
            andx.useUnicode = useUnicode;
            if (andx instanceof AndXServerMessageBlock) {
    
                /*
                 * A word about communicating header info to andx smbs
                 *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.9K bytes
    - Viewed (0)
Back to top