Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 117 for aligned (0.28 sec)

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

            byte[] fileId = new byte[16];
            Arrays.fill(fileId, (byte) 0xCC);
    
            byte[] header = buildSmb2Header();
            int ctxOffsetFromHeader = 256; // arbitrary aligned location beyond header
            byte[] baseBody = buildCreateBodyWithContext(fileId, ctxOffsetFromHeader);
    
            // Build actual context bytes matching the pointers inside baseBody
            byte[] ctx = new byte[0x40];
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectRequestTest.java

                int expectedAligned = (int) size8Method.invoke(req, expectedUnaligned);
    
                // Then
                assertEquals(expectedAligned, actualSize);
                assertEquals(0, actualSize % 8); // Should be 8-byte aligned
            }
        }
    
        @Test
        @DisplayName("Should write proper wire format structure")
        void testWireFormatStructure() throws Exception {
            // Given
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/io/Smb2ReadRequestTest.java

                assertEquals(expectedSize, request.size());
            }
    
            @Test
            @DisplayName("Should align size to 8-byte boundary")
            void testSizeAlignment() {
                int size = request.size();
                assertEquals(0, size % 8, "Size should be aligned to 8-byte boundary");
            }
    
            @Test
            @DisplayName("Should have consistent size regardless of parameters")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 24.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java

                assertEquals(expectedSize, req.size());
            }
    
            @Test
            @DisplayName("Should align size to 8-byte boundary")
            void testSizeAlignment() {
                int size = request.size();
                assertEquals(0, size % 8, "Size should be aligned to 8-byte boundary");
            }
    
            @ParameterizedTest
            @DisplayName("Should calculate size for various lock counts")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/info/Smb2QueryInfoRequestTest.java

                int expectedLength = (Math.min(256, 128) - Smb2QueryInfoResponse.OVERHEAD) & ~0x7;
                assertEquals(expectedLength, actualOutputBufferLength);
    
                // Result should be aligned to 8 bytes
                assertEquals(0, actualOutputBufferLength % 8);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 22.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseTest.java

            when(mockRequest.getCapabilities()).thenReturn(0);
    
            // When
            boolean valid = response.isValid(mockContext, mockRequest);
    
            // Then
            assertTrue(valid);
            // Should be aligned to 8-byte boundary
            assertEquals(32768 & ~0x7, response.getReceiveBufferSize());
            assertEquals(32768 & ~0x7, response.getSendBufferSize());
            assertTrue(response.getTransactionBufferSize() <= 65536);
        }
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 32.5K bytes
    - Viewed (0)
  7. src/main/java/jcifs/dcerpc/ndr/NdrBuffer.java

            return this.buf;
        }
    
        /**
         * Aligns the buffer index to the specified boundary with a fill value.
         *
         * @param boundary the alignment boundary
         * @param value the fill value for padding
         * @return the number of bytes added for alignment
         */
        public int align(final int boundary, final byte value) {
            final int n = align(boundary);
            int i = n;
            while (i > 0) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 10.7K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/dcerpc/ndr/NdrBuffer.java

            return buf;
        }
    
        /**
         * Aligns the buffer index to the specified boundary with a fill value.
         *
         * @param boundary the alignment boundary
         * @param value the fill value for padding
         * @return the number of bytes added for alignment
         */
        public int align(final int boundary, final byte value) {
            final int n = align(boundary);
            int i = n;
            while (i > 0) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  9. src/main/java/jcifs/pac/PacDataInputStream.java

            this.dis = new DataInputStream(in);
            this.size = in.available();
        }
    
        /**
         * Aligns the stream position to the specified boundary.
         * @param mask the alignment mask (typically 2, 4, or 8)
         * @throws IOException if an I/O error occurs
         */
        public void align(final int mask) throws IOException {
            final int position = this.size - this.dis.available();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  10. src/main/java/jcifs/dcerpc/msrpc/samr.java

                    }
                }
            }
    
            @Override
            public void decode(NdrBuffer _src) throws NdrException {
                _src.align(4);
                this.idx = _src.dec_ndr_long();
                _src.align(4);
                if (this.name == null) {
                    this.name = new rpc.unicode_string();
                }
                this.name.length = (short) _src.dec_ndr_short();
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 23.4K bytes
    - Viewed (0)
Back to top