Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 128 for SMBProtocolDecodingException (0.15 sec)

  1. src/test/java/jcifs/internal/smb2/create/CreateContextResponseTest.java

            @Override
            public int decode(byte[] buffer, int bufferIndex, int len) throws SMBProtocolDecodingException {
                decodeCallCount++;
                if (throwOnDecode) {
                    throw new SMBProtocolDecodingException("Test decode error");
                }
                if (buffer == null) {
                    throw new SMBProtocolDecodingException("Buffer cannot be null");
                }
                if (bufferIndex < 0 || len < 0) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 16.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/lock/Smb2LockResponseTest.java

                int bufferIndex = 0;
                SMBUtil.writeInt2(5, buffer, bufferIndex); // Invalid structure size
    
                // When & Then
                SMBProtocolDecodingException exception =
                        assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, bufferIndex));
                assertEquals("Expected structureSize = 4", exception.getMessage());
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.1K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyResponse.java

        }
    
        /**
         * {@inheritDoc}
         *
         * @throws SMBProtocolDecodingException
         *             If there is an error decoding the response
         *
         * @see jcifs.internal.smb2.ServerMessageBlock2#readBytesWireFormat(byte[], int)
         */
        @Override
        protected int readBytesWireFormat(final byte[] buffer, int bufferIndex) throws SMBProtocolDecodingException {
            final int start = bufferIndex;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/smb1/trans/SmbComTransactionResponse.java

         * @param len length of data to read
         * @return number of bytes read
         * @throws SMBProtocolDecodingException if decoding fails
         */
        protected abstract int readParametersWireFormat(byte[] buffer, int bufferIndex, int len) throws SMBProtocolDecodingException;
    
        /**
         * Reads data from wire format
         * @param buffer source buffer
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/ioctl/SrvCopyChunkCopyResponseTest.java

    import org.junit.jupiter.params.provider.CsvSource;
    import org.junit.jupiter.params.provider.ValueSource;
    import org.mockito.junit.jupiter.MockitoExtension;
    
    import jcifs.internal.SMBProtocolDecodingException;
    import jcifs.internal.util.SMBUtil;
    
    @ExtendWith(MockitoExtension.class)
    class SrvCopyChunkCopyResponseTest {
    
        private SrvCopyChunkCopyResponse response;
    
        @BeforeEach
        void setUp() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.8K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseInputValidationTest.java

            byte[] malformedBuffer = createBasicNegotiateResponseBuffer();
            // Set incorrect structure size (should be 65)
            SMBUtil.writeInt2(64, malformedBuffer, 0);
    
            SMBProtocolDecodingException exception = assertThrows(SMBProtocolDecodingException.class, () -> {
                response.readBytesWireFormat(malformedBuffer, 0);
            });
    
            assertTrue(exception.getMessage().contains("Structure size is not 65"));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponseTest.java

            SMBUtil.writeInt2(0, buffer, 0);
    
            SMBProtocolDecodingException ex1 = assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, 0));
            assertEquals("Structure size != 4", ex1.getMessage());
    
            // Test maximum 2-byte value (65535)
            SMBUtil.writeInt2(65535, buffer, 0);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/ioctl/SrvRequestResumeKeyResponseTest.java

        void testDecodeThrowsExceptionWhenLengthTooShort() {
            byte[] buffer = new byte[28];
    
            // Test with len = 23 (one byte too short)
            SMBProtocolDecodingException exception = assertThrows(SMBProtocolDecodingException.class, () -> response.decode(buffer, 0, 23),
                    "Should throw exception when length < 24");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/fscc/FileInternalInfoTest.java

    import static org.junit.jupiter.api.Assertions.assertTrue;
    
    import org.junit.jupiter.api.BeforeEach;
    import org.junit.jupiter.api.DisplayName;
    import org.junit.jupiter.api.Test;
    
    import jcifs.internal.SMBProtocolDecodingException;
    import jcifs.internal.util.SMBUtil;
    
    /**
     * Test class for FileInternalInfo
     */
    class FileInternalInfoTest {
    
        private FileInternalInfo fileInternalInfo;
    
        @BeforeEach
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb1/trans/nt/FileNotifyInformationImplTest.java

            assertThrows(SMBProtocolDecodingException.class, () -> {
                notifyInfo.decode(buffer, 0, buffer.length);
            });
        }
    
        @Test
        @DisplayName("Test decode with maximum file name length")
        void testDecodeMaxFileNameLength() throws SMBProtocolDecodingException {
            // Create a very long filename (but within reasonable bounds)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.1K bytes
    - Viewed (0)
Back to top