Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for stringWireLength (0.06 sec)

  1. src/test/java/jcifs/internal/smb1/ServerMessageBlockTest.java

            void testStringWireLength() {
                testBlock.setUseUnicode(false);
                assertEquals(5, testBlock.stringWireLength("Test", 0));
    
                testBlock.setUseUnicode(true);
                assertEquals(10, testBlock.stringWireLength("Test", 0));
                assertEquals(11, testBlock.stringWireLength("Test", 1));
            }
    
            @Test
            @DisplayName("Test read string length")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 36.2K bytes
    - Viewed (0)
  2. src/main/java/jcifs/smb1/smb1/SmbComTransaction.java

                if (command != SMB_COM_NT_TRANSACT) {
                    if (command == SMB_COM_TRANSACTION && !isResponse()) {
                        parameterOffset += stringWireLength(name, parameterOffset);
                    }
                } else {
                    parameterOffset += 2;
                }
                pad = parameterOffset % PADDING_SIZE;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/smb1/ServerMessageBlock.java

            } catch (final UnsupportedEncodingException uee) {
                if (LogStream.level > 1) {
                    uee.printStackTrace(log);
                }
            }
            return str;
        }
    
        int stringWireLength(final String str, final int offset) {
            int len = str.length() + 1;
            if (useUnicode) {
                len = str.length() * 2 + 2;
                len = offset % 2 != 0 ? len + 1 : len;
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/smb1/trans/SmbComTransaction.java

                this.parameterOffset += 2; // ByteCount
    
                if (this.getCommand() == SMB_COM_TRANSACTION && !isResponse()) {
                    this.parameterOffset += stringWireLength(this.name, this.parameterOffset);
                }
    
                this.pad1 = pad(this.parameterOffset);
                this.parameterOffset += this.pad1;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 17.3K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb1/ServerMessageBlock.java

         * Calculates the wire format length of a string
         * @param str string to measure
         * @param offset current buffer offset for alignment calculation
         * @return string length
         */
        public int stringWireLength(final String str, final int offset) {
            int len = str.length() + 1;
            if (this.useUnicode) {
                len = str.length() * 2 + 2;
                len = offset % 2 != 0 ? len + 1 : len;
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 38.9K bytes
    - Viewed (0)
Back to top