Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 122 for writeBytesWireFormat (5.91 sec)

  1. src/test/java/jcifs/smb1/smb1/SmbComOpenAndXTest.java

            assertEquals(26, result);
        }
    
        /**
         * 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)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/com/SmbComSetInformationResponseTest.java

            }
        }
    
        @Nested
        @DisplayName("writeBytesWireFormat tests")
        class WriteBytes {
    
            @Test
            @DisplayName("Returns 0 with null array")
            void nullArray() {
                assertEquals(0, response.writeBytesWireFormat(null, 0));
            }
    
            @ParameterizedTest
            @ValueSource(ints = { 0, 7 })
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java

            cmd = new SmbComQueryInformation(mockConfig, "testfile.txt");
        }
    
        @Test
        @DisplayName("writeBytesWireFormat writes the command byte followed by the null terminated string")
        void testWriteBytesWireFormatHappy() throws UnsupportedEncodingException {
            byte[] buffer = new byte[50];
            int used = cmd.writeBytesWireFormat(buffer, 0);
            // Calculate expected size: 1 byte for command + string bytes + 1 null terminator
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/SmbComWriteAndXResponseTest.java

            assertEquals(0, bytesWritten);
        }
    
        /**
         * Test the writeBytesWireFormat method.
         */
        @Test
        void testWriteBytesWireFormat() {
            SmbComWriteAndXResponse response = new SmbComWriteAndXResponse();
            byte[] dst = new byte[0];
    
            int bytesWritten = response.writeBytesWireFormat(dst, 0);
    
            // This method does nothing and should return 0.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/session/Smb2LogoffRequestTest.java

        @ValueSource(ints = { 0, 1, 5 })
        @DisplayName("writeBytesWireFormat writes StructureSize=4 and Reserved=0 at given offset")
        void writeBytesWireFormat_writesExpectedValuesAtOffset(int offset) {
            // Arrange
            Smb2LogoffRequest req = newRequest();
            byte[] buf = new byte[offset + 8]; // extra space for safety
    
            // Act
            int written = req.writeBytesWireFormat(buf, offset);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/lock/Smb2LockResponse.java

            super(config);
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.internal.smb2.ServerMessageBlock2#writeBytesWireFormat(byte[], int)
         */
        @Override
        protected int writeBytesWireFormat(final byte[] dst, final int dstIndex) {
            return 0;
        }
    
        /**
         * {@inheritDoc}
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponse.java

            super(config);
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.internal.smb2.ServerMessageBlock2#writeBytesWireFormat(byte[], int)
         */
        @Override
        protected int writeBytesWireFormat(final byte[] dst, final int dstIndex) {
            return 0;
        }
    
        /**
         * {@inheritDoc}
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyResponse.java

            super(config);
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.internal.smb2.ServerMessageBlock2#writeBytesWireFormat(byte[], int)
         */
        @Override
        protected int writeBytesWireFormat(final byte[] dst, final int dstIndex) {
            return 0;
        }
    
        /**
         * {@inheritDoc}
         *
         * @throws SMBProtocolDecodingException
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/session/Smb2LogoffResponseTest.java

            Smb2LogoffResponse resp = new Smb2LogoffResponse(cfg);
    
            // Assert
            assertNotNull(resp, "Response instance should be created");
        }
    
        @Nested
        @DisplayName("writeBytesWireFormat")
        class WriteBytesWireFormat {
    
            @ParameterizedTest
            @ValueSource(ints = { -10, -1, 0, 1, 42 })
            @DisplayName("Returns 0 regardless of dst and index")
            void returnsZero_forVariousIndexes(int index) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb1/smb1/SmbComBlankResponseTest.java

        }
    
        /**
         * Test for the writeBytesWireFormat method.
         * It should always return 0.
         */
        @Test
        void testWriteBytesWireFormat() {
            assertEquals(0, response.writeBytesWireFormat(buffer, 0), "writeBytesWireFormat should return 0");
        }
    
        /**
         * Test for the readParameterWordsWireFormat method.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 1.9K bytes
    - Viewed (0)
Back to top