Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 607 for decode (0.04 sec)

  1. src/test/java/jcifs/util/EncdecTest.java

            Encdec.enc_uint64le(currentDate.getTime(), buffer, 0);
            long decoded = Encdec.dec_uint64le(buffer, 0);
    
            // Then
            assertEquals(currentDate.getTime(), decoded, "Encoded and decoded time should match");
        }
    
        @Test
        @DisplayName("Should encode and decode UUIDs")
        void testUUIDOperations() {
            // Given
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/fscc/FileRenameInformation2Test.java

            FileRenameInformation2 original = new FileRenameInformation2(fileName, replaceIfExists);
    
            // Encode
            byte[] buffer = new byte[200];
            int bytesWritten = original.encode(buffer, 0);
    
            // Decode
            FileRenameInformation2 decoded = new FileRenameInformation2();
            int bytesRead = decoded.decode(buffer, 0, bytesWritten);
    
            // Verify round trip
            assertEquals(bytesWritten, bytesRead);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/fscc/FileEndOfFileInformationTest.java

            SMBUtil.writeInt8(expectedValue, buffer, offset);
    
            // Decode from offset
            int bytesRead = fileInfo.decode(buffer, offset, buffer.length - offset);
    
            assertEquals(8, bytesRead);
            assertTrue(fileInfo.toString().contains("endOfFile=" + expectedValue));
        }
    
        @Test
        @DisplayName("Test encode and decode round trip")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/ntlmssp/av/AvPairsTest.java

        }
    
        /**
         * Test decode with only EOL
         */
        @Test
        @DisplayName("Decode empty list with only EOL")
        void testDecodeEmptyList() throws CIFSException {
            byte[] eolData = createEolData();
            List<AvPair> pairs = AvPairs.decode(eolData);
    
            assertNotNull(pairs, "Decoded pairs should not be null");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/dcerpc/msrpc/samrTest.java

                // Setup for SamrSamEntry decode chain
                mockDeferredBuffer.deferred = mockDeferredBuffer;
                when(mockDeferredBuffer.dec_ndr_short()).thenReturn(0, 0, 0);
    
                // When: Decoding output
                message.decode_out(mockNdrBuffer);
    
                // Then: Should decode all output parameters
                verify(samArray).decode(mockNdrBuffer);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 33.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/trans/nt/FileNotifyInformationImplTest.java

        }
    
        @Test
        @DisplayName("Test decode with valid single entry")
        void testDecodeValidSingleEntry() throws SMBProtocolDecodingException {
            String fileName = "document.pdf";
            int action = FileNotifyInformation.FILE_ACTION_MODIFIED;
            byte[] buffer = createValidNotificationBuffer(fileName, action);
    
            int bytesRead = notifyInfo.decode(buffer, 0, buffer.length);
    
            assertTrue(bytesRead > 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)
  7. src/test/java/jcifs/internal/fscc/FileSystemInformationTest.java

            }
    
            @Test
            @DisplayName("Should decode buffer correctly")
            void testDecode() throws SMBProtocolDecodingException {
                byte[] buffer = new byte[100];
                when(mockFileSystemInfo.decode(any(byte[].class), anyInt(), anyInt())).thenReturn(24);
    
                int result = mockFileSystemInfo.decode(buffer, 0, 100);
    
                assertEquals(24, result);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/nego/PreauthIntegrityNegotiateContextTest.java

                int encoded = originalContext.encode(buffer, 0);
    
                PreauthIntegrityNegotiateContext decodedContext = new PreauthIntegrityNegotiateContext();
                int decoded = decodedContext.decode(buffer, 0, encoded);
    
                assertEquals(encoded, decoded);
                assertArrayEquals(originalHashAlgos, decodedContext.getHashAlgos());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 34K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/dcerpc/ndr/NdrShortTest.java

            NdrShort decoded = new NdrShort(0);
            decoded.decode(buf);
            assertEquals(123, decoded.value, "decoded value should equal original");
        }
    
        /**
         * Verify that encode invokes NdrBuffer.enc_ndr_short via a mocked
         * (spied) buffer.
         */
        @Test
        void encodeWithSpiedBufferCallsEncMethod() throws NdrException {
            NdrShort ns = new NdrShort(42);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/dtyp/SecurityDescriptorTest.java

        }
    
        @Test
        @DisplayName("Test decode with owner SID only")
        void testDecodeWithOwnerSidOnly() throws SMBProtocolDecodingException {
            // Prepare buffer with owner SID only
            prepareMinimalSecurityDescriptorBuffer(testBuffer, 0, true, false, false);
    
            int size = securityDescriptor.decode(testBuffer, 0, testBuffer.length);
    
            // decode returns 0 when no DACL is present (falls through)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
Back to top