Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 141 - 150 of 153 for readBytesWireFormat (0.6 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectResponseTest.java

            SMBUtil.writeInt2(0, buffer, 2);
    
            // When - simulate multiple concurrent reads on same response object
            int read1 = response.readBytesWireFormat(buffer, 0);
            int read2 = response.readBytesWireFormat(buffer, 0);
            int read3 = response.readBytesWireFormat(buffer, 0);
    
            // Then - all reads should return same result
            assertEquals(4, read1);
            assertEquals(4, read2);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 14.1K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java

                }
            }
    
            TestSmb2ReadResponse testResponse = new TestSmb2ReadResponse(mockConfig, outputBuffer, outputBufferOffset);
    
            // When
            int bytesRead = testResponse.readBytesWireFormat(buffer, bufferIndex);
    
            // Then
            assertTrue(testResponse.errorResponseCalled);
            assertEquals(8, bytesRead); // Error response is 8 bytes
        }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 22.1K bytes
    - Click Count (0)
  3. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseInputValidationTest.java

            SMBUtil.writeInt2(64, malformedBuffer, 0);
    
            SMBProtocolDecodingException exception = assertThrows(SMBProtocolDecodingException.class, () -> {
                response.readBytesWireFormat(malformedBuffer, 0);
            });
    
            assertTrue(exception.getMessage().contains("Structure size is not 65"));
            assertTrue(exception.getMessage().contains("got: 64"));
        }
    
        /**
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 15.8K bytes
    - Click Count (0)
  4. src/test/java/jcifs/internal/smb2/lock/Smb2OplockBreakNotificationTest.java

                notification.readBytesWireFormat(buffer1, 0);
    
                // Second read with different values
                byte[] fileId2 = new byte[16];
                Arrays.fill(fileId2, (byte) 0x99);
                byte[] buffer2 = createValidOplockBreakBuffer((byte) 0x08, fileId2);
                notification.readBytesWireFormat(buffer2, 0);
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 17.6K bytes
    - Click Count (0)
  5. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyResponseTest.java

            System.arraycopy(fileNameBytes, 0, buffer, notifyOffset + 12, fileNameBytes.length);
    
            // When
            int bytesRead = response.readBytesWireFormat(buffer, offset);
    
            // Then
            assertTrue(bytesRead > 0);
            List<FileNotifyInformation> notifications = response.getNotifyInformation();
            assertEquals(1, notifications.size());
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 18.8K bytes
    - Click Count (0)
  6. src/test/java/jcifs/internal/smb2/Smb2EchoResponseTest.java

                int bufferIndex = 100;
    
                // Write structure size = 4
                SMBUtil.writeInt2(4, buffer, bufferIndex);
    
                int result = echoResponse.readBytesWireFormat(buffer, bufferIndex);
    
                assertEquals(0, result);
            }
    
            @Test
            @DisplayName("Should throw exception for invalid structure size")
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 15.1K bytes
    - Click Count (0)
  7. src/test/java/jcifs/internal/smb2/ServerMessageBlock2Test.java

            }
    
            @Override
            protected int writeBytesWireFormat(byte[] dst, int dstIndex) {
                return bytesWritten;
            }
    
            @Override
            protected int readBytesWireFormat(byte[] buffer, int bufferIndex) throws SMBProtocolDecodingException {
                if (throwOnRead) {
                    throw new SMBProtocolDecodingException("Test exception");
                }
                return bytesRead;
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 39.5K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb1/com/SmbComNegotiateResponseTest.java

            System.arraycopy(key, 0, buffer, bufferIndex, key.length);
            bufferIndex += key.length;
            System.arraycopy(domainBytes, 0, buffer, bufferIndex, domainBytes.length);
    
            response.readBytesWireFormat(buffer, 0);
    
            assertArrayEquals(key, response.getServerData().encryptionKey);
            assertEquals("DOMAIN", response.getServerData().oemDomainName);
        }
    
        @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.4K bytes
    - Click Count (0)
  9. src/test/java/jcifs/smb1/smb1/SmbComOpenAndXResponseTest.java

        }
    
        @Test
        void testReadBytesWireFormat() {
            byte[] buffer = new byte[1024];
            int result = response.readBytesWireFormat(buffer, 0);
    
            // The method should read bytes
            assertEquals(0, result, "readBytesWireFormat should return 0 for response");
        }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  10. src/test/java/jcifs/smb1/smb1/SmbComReadAndXResponseTest.java

        public void testWriteBytesWireFormat() {
            assertEquals(0, response.writeBytesWireFormat(new byte[0], 0));
        }
    
        @Test
        public void testReadBytesWireFormat() {
            assertEquals(0, response.readBytesWireFormat(new byte[0], 0));
        }
    
        @Nested
        class WhenReadingParameterWordsWireFormat {
    
            private final byte[] buffer = new byte[20];
            private final int dataCompactionMode = 1;
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 3.3K bytes
    - Click Count (0)
Back to Top