Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 178 for writeBytesWireFormat (0.71 sec)

  1. src/test/java/jcifs/internal/smb2/io/Smb2ReadRequestTest.java

                // Test at position 0
                int bytesWritten = request.writeBytesWireFormat(buffer, 0);
                assertEquals(49, bytesWritten);
                assertEquals(2048, SMBUtil.readInt4(buffer, 4));
    
                // Test at position 100
                Arrays.fill(buffer, (byte) 0);
                bytesWritten = request.writeBytesWireFormat(buffer, 100);
                assertEquals(49, bytesWritten);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 24.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/io/Smb2FlushRequestTest.java

        }
    
        @Test
        @DisplayName("writeBytesWireFormat should write correct structure")
        void testWriteBytesWireFormat() {
            byte[] buffer = new byte[256];
            int offset = 64; // Start at offset to test proper indexing
    
            int written = request.writeBytesWireFormat(buffer, offset);
    
            // Verify bytes written
            assertEquals(24, written);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K 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/internal/smb2/tree/Smb2TreeDisconnectRequestTest.java

            byte[] buffer1 = new byte[256];
            byte[] buffer2 = new byte[256];
    
            // When
            int bytes1 = request.writeBytesWireFormat(buffer1, 0);
            int bytes2 = request.writeBytesWireFormat(buffer2, 10);
    
            // Then
            assertEquals(bytes1, bytes2);
            assertEquals(SMBUtil.readInt2(buffer1, 0), SMBUtil.readInt2(buffer2, 10));
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. src/test/java/jcifs/internal/smb2/io/Smb2FlushResponseTest.java

                // Given
                byte[] dst = new byte[100];
    
                // When & Then
                assertEquals(0, response.writeBytesWireFormat(dst, 0));
                assertEquals(0, response.writeBytesWireFormat(dst, 50));
                assertEquals(0, response.writeBytesWireFormat(dst, 99));
            }
    
            @Test
            @DisplayName("Should return 0 with empty array")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/info/Smb2SetInfoResponseTest.java

            assertEquals((short) 0, response.getCommand());
        }
    
        @Test
        @DisplayName("Test writeBytesWireFormat returns 0")
        void testWriteBytesWireFormat() {
            byte[] dst = new byte[1024];
            int dstIndex = 0;
    
            int result = response.writeBytesWireFormat(dst, dstIndex);
    
            assertEquals(0, result);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top