Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 178 for writeBytesWireFormat (0.34 seconds)

  1. src/test/java/jcifs/internal/smb2/ioctl/Smb2IoctlRequestTest.java

        }
    
        @Test
        @DisplayName("Test writeBytesWireFormat without data")
        void testWriteBytesWireFormatWithoutData() {
            setupMockConfig();
            Smb2IoctlRequest request = new Smb2IoctlRequest(mockConfig, TEST_CONTROL_CODE, TEST_FILE_ID);
            byte[] buffer = new byte[1024];
    
            int written = request.writeBytesWireFormat(buffer, 0);
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 14.3K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/smb1/com/SmbComRenameTest.java

            int result = smbComRename.writeBytesWireFormat(dst, dstIndex);
    
            // Then
            assertTrue(result > 0);
            assertTrue(result < dst.length);
            assertEquals((byte) 0x04, dst[0]); // First buffer format byte
        }
    
        /**
         * Test writeBytesWireFormat with different buffer offsets
         */
        @Test
        @DisplayName("Test writeBytesWireFormat with different buffer offsets")
    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)
  3. src/test/java/jcifs/smb1/smb1/SmbComOpenAndXTest.java

            assertEquals(26, result);
        }
    
        /**
         * Test writeBytesWireFormat method with Unicode.
         */
        @Test
        void testWriteBytesWireFormat_Unicode() {
            smbComOpenAndX = new SmbComOpenAndX(fileName, access, 0, andx);
            smbComOpenAndX.useUnicode = true;
            // For Unicode: 1 byte (initial null in writeBytesWireFormat)
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 5.6K bytes
    - Click Count (0)
  4. 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);
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 5.4K bytes
    - Click Count (0)
  5. 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
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 4.9K bytes
    - Click Count (0)
  6. 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
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  7. 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}
         *
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  8. 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}
         *
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 2.2K bytes
    - Click Count (0)
  9. src/test/java/jcifs/internal/smb1/com/SmbComTreeDisconnectTest.java

            int dstIndex = 0;
    
            // When
            int result = smbComTreeDisconnect.writeBytesWireFormat(dst, dstIndex);
    
            // Then
            assertEquals(0, result);
        }
    
        /**
         * Test writeBytesWireFormat with various buffer sizes
         */
        @Test
        @DisplayName("Test writeBytesWireFormat with different buffer sizes")
        public void testWriteBytesWireFormatWithDifferentBufferSizes() {
    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)
  10. 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) {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 5.2K bytes
    - Click Count (0)
Back to Top