Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 1,386 for Byte (0.1 sec)

  1. src/test/java/jcifs/internal/smb2/nego/NegotiateContextRequestTest.java

            @Test
            @DisplayName("Should encode at different buffer positions")
            void testEncodeAtDifferentPositions() {
                int[] hashAlgos = { 1, 2 };
                byte[] salt = new byte[8];
                Arrays.fill(salt, (byte) 0xFF);
    
                context = new PreauthIntegrityNegotiateContext(mockConfig, hashAlgos, salt);
    
                // Encode at position 100
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/EncodableTest.java

                    Arguments.of(makeSeq(16), 0, 0, 5) // zero-length with non-zero dst index
            );
        }
    
        // Creates a deterministic byte sequence [0,1,2,...,n-1]
        private static byte[] makeSeq(int n) {
            byte[] a = new byte[n];
            for (int i = 0; i < n; i++) {
                a[i] = (byte) i;
            }
            return a;
        }
    
        @ParameterizedTest
        @MethodSource("byteEncodableArgs")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/fscc/FileInternalInfoTest.java

            // First decode to set internal state
            byte[] sourceBuffer = new byte[8];
            long expectedIndexNumber = 0x0123456789ABCDEFL;
            SMBUtil.writeInt8(expectedIndexNumber, sourceBuffer, 0);
            fileInternalInfo.decode(sourceBuffer, 0, sourceBuffer.length);
    
            // Now test encode
            byte[] destinationBuffer = new byte[8];
            int bytesEncoded = fileInternalInfo.encode(destinationBuffer, 0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/SmbComOpenAndXTest.java

            // For Unicode: 1 byte (initial null in writeBytesWireFormat)
            // + potential 1 byte alignment (in writeString) + fileName.length() * 2 + 2 bytes (terminating nulls)
            // Since headerStart is 0 and dstIndex starts at 1 (after initial null), (1-0)%2=1, so alignment byte added
            // Total: 1 + 1 + 12*2 + 2 = 28 bytes
            byte[] dst = new byte[30]; // Use extra buffer space to avoid index errors
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/AndXServerMessageBlockTest.java

            DummyAndXBlock block = new DummyAndXBlock();
            byte[] buf = new byte[128];
            int n = block.writeAndXWireFormat(buf, 0);
    
            assertTrue(n > 0);
            // Common AndX header: command at +1, reserved at +2, offset at +3/+4
            assertEquals((byte) 0xFF, buf[1], "AndX command should be 0xFF when no chaining");
            assertEquals((byte) 0x00, buf[2], "Reserved byte must be 0");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/create/LeaseV2CreateContextResponse.java

        }
    
        @Override
        public int decode(byte[] buffer, int bufferIndex, int len) throws SMBProtocolDecodingException {
            int start = bufferIndex;
    
            if (len < 52) {
                throw new SMBProtocolDecodingException("Lease V2 context data too short: " + len);
            }
    
            // Read lease V2 data (52 bytes)
            byte[] keyBytes = new byte[16];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/fscc/FileStandardInfo.java

        }
    
        @Override
        public long getSize() {
            return this.endOfFile;
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.Decodable#decode(byte[], int, int)
         */
        @Override
        public int decode(final byte[] buffer, int bufferIndex, final int len) throws SMBProtocolDecodingException {
            final int start = bufferIndex;
            this.allocationSize = SMBUtil.readInt8(buffer, bufferIndex);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/create/CreateContextResponseTest.java

                byte[] buffer1 = new byte[100];
                byte[] buffer2 = new byte[200];
    
                Arrays.fill(buffer1, (byte) 0x11);
                Arrays.fill(buffer2, (byte) 0x22);
    
                // First decode
                response.decode(buffer1, 0, 50);
                byte[] data1 = response.getData();
    
                // Second decode should overwrite
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 16.2K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java

            byte[] buffer = new byte[50];
            int used = nullPathCmd.writeBytesWireFormat(buffer, 0);
            // Should write command byte + null terminator only
            assertEquals(2, used, "Null path should result in command byte + NUL");
            assertEquals(0x04, buffer[0] & 0xFF, "First byte must still be 0x04");
            assertEquals(0, buffer[1], "Second byte must be null terminator");
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  10. src/test/java/jcifs/util/EncdecTest.java

        @Test
        @DisplayName("Should encode and decode UUIDs")
        void testUUIDOperations() {
            // Given
            byte[] uuid = { 0x12, 0x34, 0x56, 0x78, (byte) 0x9A, (byte) 0xBC, (byte) 0xDE, (byte) 0xF0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
                    0x77, (byte) 0x88 };
            byte[] buffer = new byte[16];
    
            // When
            System.arraycopy(uuid, 0, buffer, 0, 16);
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.1K bytes
    - Viewed (0)
Back to top