Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 607 for decode (0.06 sec)

  1. src/test/java/jcifs/smb1/util/Base64Test.java

        }
    
        @ParameterizedTest(name = "decode({1}) -> {2}")
        @MethodSource("decodeProvider")
        void testDecode(String encoded, byte[] expected) {
            // Act
            byte[] actual = Base64.decode(encoded);
            // Assert
            assertArrayEquals(expected, actual, "Base64.decode should return original bytes");
        }
    
        @Test
        @DisplayName("encode should throw NPE on null input")
        void testEncodeNull() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/dcerpc/msrpc/srvsvcTest.java

            when(mockDeferredBuffer.dec_ndr_string()).thenReturn("DecodedShare", "Decoded Remark");
    
            shareInfo1.decode(mockNdrBuffer);
    
            assertEquals("DecodedShare", shareInfo1.netname);
            assertEquals(2, shareInfo1.type);
            assertEquals("Decoded Remark", shareInfo1.remark);
            verify(mockNdrBuffer).align(4);
            verify(mockNdrBuffer, times(3)).dec_ndr_long();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12K bytes
    - Viewed (0)
  3. src/test/java/jcifs/dcerpc/rpcTest.java

                // When/Then: Should throw NdrException
                assertThrows(NdrException.class, () -> policyHandle.encode(mockNdrBuffer));
            }
    
            @Test
            @DisplayName("Should decode policy handle correctly")
            void testPolicyHandleDecode() throws NdrException {
                // Given: A policy handle to decode into
                rpc.policy_handle policyHandle = new rpc.policy_handle();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/ioctl/SrvPipePeekResponseTest.java

            SMBUtil.writeInt4(messageLength, buffer, bufferIndex + 12);
            System.arraycopy(testData, 0, buffer, bufferIndex + 16, testData.length);
    
            // Decode
            int bytesDecoded = response.decode(buffer, bufferIndex, buffer.length);
    
            // Verify results
            assertEquals(namedPipeState, response.getNamedPipeState());
            assertEquals(readDataAvailable, response.getReadDataAvailable());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        assertThat(UnsignedLongs.decode("0xffffffffffffffff")).isEqualTo(0xffffffffffffffffL);
        assertThat(UnsignedLongs.decode("01234567")).isEqualTo(01234567); // octal
        assertThat(UnsignedLongs.decode("#1234567890abcdef")).isEqualTo(0x1234567890abcdefL);
        assertThat(UnsignedLongs.decode("987654321012345678")).isEqualTo(987654321012345678L);
        assertThat(UnsignedLongs.decode("0x135791357913579")).isEqualTo(0x135791357913579L);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/fscc/SmbInfoAllocationTest.java

            // Decode
            smbInfoAllocation.decode(buffer, 0, buffer.length);
    
            // Verify - with sectPerAlloc = 1, capacity = alloc * bytesPerSect
            assertEquals(alloc * bytesPerSect, smbInfoAllocation.getCapacity());
            assertEquals(free * bytesPerSect, smbInfoAllocation.getFree());
        }
    
        @Test
        @DisplayName("Test decode with large bytes per sector")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/dcerpc/ndr/NdrShortTest.java

                // When: Decoding the value
                ndrShort.decode(mockBuffer);
    
                // Then: Should set the negative value directly (no masking on decode)
                verify(mockBuffer).dec_ndr_short();
                assertEquals(negativeValue, ndrShort.value);
            }
    
            @Test
            @DisplayName("Should decode large value correctly")
            void testDecodeLargeValue() throws NdrException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/dcerpc/msrpc/lsarpcTest.java

            verify(objAttr.object_name).decode(mockDeferredNdrBuffer);
            verify(objAttr.security_quality_of_service).decode(mockDeferredNdrBuffer);
        }
    
        @Test
        void testLsarObjectAttributesDecodeNullReferents() throws NdrException {
            lsarpc.LsarObjectAttributes objAttr = new lsarpc.LsarObjectAttributes();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 60.8K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/misc/Base64Util.java

         * @return The decoded data
         */
        public static byte[] decode(final String inData) {
            if (StringUtil.isEmpty(inData)) {
                return null;
            }
            final int num = inData.length() / 4 - 1;
            final int lastBytes = getLastBytes(inData);
            final byte[] outData = new byte[num * 3 + lastBytes];
            for (int i = 0; i < num; i++) {
                decode(inData, i * 4, outData, i * 3);
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/fscc/FileFsSizeInformationTest.java

                assertEquals(FileSystemInformation.FS_SIZE_INFO, fileFsSizeInfo.getFileSystemInformationClass());
            }
        }
    
        @Nested
        @DisplayName("Decode Method Tests")
        class DecodeMethodTests {
    
            @Test
            @DisplayName("Should decode buffer with typical values correctly")
            void shouldDecodeBufferWithTypicalValues() throws SMBProtocolDecodingException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.9K bytes
    - Viewed (0)
Back to top