Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 178 for writeBytesWireFormat (0.08 sec)

  1. 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)
  2. src/test/java/jcifs/internal/smb2/Smb2EchoRequestTest.java

        }
    
        @Nested
        @DisplayName("WriteBytesWireFormat Tests")
        class WriteBytesWireFormatTests {
    
            @Test
            @DisplayName("Should write correct structure size")
            void testWriteBytesWireFormat() {
                byte[] buffer = new byte[100];
                int startIndex = 10;
    
                int bytesWritten = echoRequest.writeBytesWireFormat(buffer, startIndex);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java

            request = new Smb2NegotiateRequest(mockConfig, Smb2Constants.SMB2_NEGOTIATE_SIGNING_REQUIRED);
    
            byte[] buffer = new byte[512];
    
            // When
            int bytesWritten = request.writeBytesWireFormat(buffer, 0);
    
            // Then
            assertTrue(bytesWritten > 0);
    
            // Verify structure size
            assertEquals(36, SMBUtil.readInt2(buffer, 0));
    
            // Verify dialect count
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb1/com/SmbComLockingAndX.java

            bufferIndex += 2;
            return start - bufferIndex;
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.internal.smb1.ServerMessageBlock#writeBytesWireFormat(byte[], int)
         */
        @Override
        protected int writeBytesWireFormat(final byte[] dst, int dstIndex) {
            final int start = dstIndex;
            if (this.unlocks != null) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/smb1/SmbComCloseTest.java

            for (int i = 2; i < 6; i++) {
                assertEquals((byte) 0xFF, buffer[i], "byte %d should be 0xFF".formatted(i));
            }
        }
    
        /**
         * Verify that read methods and writeBytesWireFormat return 0,
         * while writeParameterWordsWireFormat returns 6 (the number of bytes written).
         */
        @Test
        @DisplayName("happy: read/write methods return expected values")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  10. 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)
Back to top