Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 60 for readBytesWireFormat (0.17 seconds)

  1. src/test/java/jcifs/internal/smb2/info/Smb2SetInfoResponseTest.java

            byte[] bufferCopy = buffer.clone();
    
            // Call readBytesWireFormat
            response.readBytesWireFormat(buffer, bufferIndex);
    
            // Verify buffer wasn't modified
            assertArrayEquals(bufferCopy, buffer, "Buffer content should not be modified");
        }
    
        @Test
        @DisplayName("Test multiple calls to readBytesWireFormat")
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 10.3K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/smb2/io/Smb2WriteResponseTest.java

        }
    
        @Nested
        @DisplayName("ReadBytesWireFormat Tests")
        class ReadBytesWireFormatTests {
    
            @Test
            @DisplayName("Should read valid write response")
            void testReadValidWriteResponse() throws SMBProtocolDecodingException {
                byte[] buffer = createValidWriteResponse(1024, 512);
    
                int bytesRead = response.readBytesWireFormat(buffer, 0);
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 15.9K bytes
    - Click Count (0)
  3. src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponseTest.java

                    assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, bufferIndex),
                            "Should throw SMBProtocolDecodingException for structure size " + invalidSize);
    
            assertEquals("Expected structureSize = 9", exception.getMessage());
        }
    
        @Test
        @DisplayName("Test readBytesWireFormat with single file entry")
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 23.5K bytes
    - Click Count (0)
  4. src/test/java/jcifs/internal/smb2/info/Smb2QueryInfoResponseTest.java

            byte[] bufferCopy = buffer.clone();
    
            // Call readBytesWireFormat
            response.readBytesWireFormat(buffer, bufferIndex);
    
            // Verify buffer wasn't modified except for the decode operations
            assertArrayEquals(bufferCopy, buffer, "Buffer content should not be modified");
        }
    
        @Test
        @DisplayName("Test readBytesWireFormat with offset calculation")
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 24.5K bytes
    - Click Count (0)
  5. src/test/java/jcifs/internal/smb2/lock/Smb2LockResponseTest.java

                byte[] buffer = new byte[10];
                SMBUtil.writeInt2(4, buffer, 0);
    
                // When
                int read1 = response1.readBytesWireFormat(buffer, 0);
                int read2 = response2.readBytesWireFormat(buffer, 0);
    
                // Then
                assertEquals(4, read1);
                assertEquals(4, read2);
            }
        }
    
        @Nested
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 17.1K bytes
    - Click Count (0)
  6. src/test/java/jcifs/internal/smb1/com/SmbComTreeDisconnectTest.java

            int bufferIndex = 0;
    
            // When
            int result = smbComTreeDisconnect.readBytesWireFormat(buffer, bufferIndex);
    
            // Then
            assertEquals(0, result);
        }
    
        /**
         * Test readBytesWireFormat with various buffer sizes
         */
        @Test
        @DisplayName("Test readBytesWireFormat with different buffer sizes")
        public void testReadBytesWireFormatWithDifferentBufferSizes() {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 18.5K bytes
    - Click Count (0)
  7. src/test/java/jcifs/internal/smb1/trans/nt/SmbComNtCancelTest.java

            }
    
            @Test
            @DisplayName("readBytesWireFormat should return 0")
            void testReadBytesReturnsZero() throws Exception {
                // Given
                byte[] buffer = new byte[100];
                int bufferIndex = 10;
    
                // When
                Method method = SmbComNtCancel.class.getDeclaredMethod("readBytesWireFormat", byte[].class, int.class);
                method.setAccessible(true);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 12.8K bytes
    - Click Count (0)
  8. src/main/java/jcifs/internal/smb1/trans/SmbComTransactionResponse.java

            final int len = super.decode(buffer, bufferIndex);
            if (this.byteCount == 0) {
                // otherwise hasMore may not be correctly set
                readBytesWireFormat(buffer, len + bufferIndex);
            }
            nextElement();
            return len;
        }
    
        @Override
        protected int readParameterWordsWireFormat(final byte[] buffer, int bufferIndex) {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 12.3K bytes
    - Click Count (0)
  9. src/test/java/jcifs/internal/smb1/com/SmbComRenameTest.java

        }
    
        /**
         * Test readBytesWireFormat method
         */
        @Test
        @DisplayName("Test readBytesWireFormat always returns 0")
        public void testReadBytesWireFormat() {
            // Given
            byte[] buffer = new byte[10];
            smbComRename = new SmbComRename(config, "old.txt", "new.txt");
    
            // When
            int result = smbComRename.readBytesWireFormat(buffer, 0);
    
            // Then
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 12.5K bytes
    - Click Count (0)
  10. src/test/java/jcifs/smb1/smb1/SmbComTransactionResponseTest.java

     * provided purely to expose protected state and to satisfy the abstract
     * method contract.  The tests focus on public API behaviour and the
     * parsing logic in {@code readParameterWordsWireFormat} and
     * {@code readBytesWireFormat}.
     */
    public class SmbComTransactionResponseTest {
        /** A minimal concrete subclass for testing */
        private static class DummyResponse extends SmbComTransactionResponse {
            DummyResponse() {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 12K bytes
    - Click Count (0)
Back to Top