Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 129 for toByteArray (0.05 sec)

  1. android/guava-tests/test/com/google/common/io/FilesTest.java

      }
    
      public void testToByteArray() throws IOException {
        File asciiFile = getTestFile("ascii.txt");
        File i18nFile = getTestFile("i18n.txt");
        assertThat(Files.toByteArray(asciiFile)).isEqualTo(ASCII.getBytes(US_ASCII));
        assertThat(Files.toByteArray(i18nFile)).isEqualTo(I18N.getBytes(UTF_8));
        assertThat(Files.asByteSource(i18nFile).read()).isEqualTo(I18N.getBytes(UTF_8));
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 18:44:53 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/pac/PacLogonInfoTest.java

            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
            PacDataInputStream pacStream = new PacDataInputStream(bais);
    
            SID id = pacStream.readId();
            assertNotNull(id);
            // The RID should be incorporated into the SID
            byte[] sidBytes = id.toByteArray();
            assertTrue(sidBytes.length > 0);
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SIDTest.java

            @DisplayName("Binary constructor happy path and round-trip via toByteArray")
            void testBinaryConstructorAndToByteArray() {
                // Arrange: revision=1, count=2, identAuth zeros except last byte, subauth 10, 20
                byte[] ident = new byte[] { 0, 0, 0, 0, 0, 5 };
                rpc.sid_t st = buildSidT((byte) 1, ident, 10, 20);
    
                byte[] bytes = SID.toByteArray(st);
    
                // Act: construct from bytes and re-encode
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  4. impl/maven-core/src/main/java/org/apache/maven/logging/LoggingOutputStream.java

            if (buf.isEol()) {
                String line = new String(buf.toByteArray(), 0, buf.size() - LINE_SEP.length);
                ProjectBuildLogAppender.updateMdc();
                consumer.accept(line);
                buf.reset();
            }
        }
    
        public void forceFlush() {
            if (buf.size() > 0) {
                String line = new String(buf.toByteArray(), 0, buf.size());
                ProjectBuildLogAppender.updateMdc();
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Wed Feb 12 12:31:43 UTC 2025
    - 3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/pac/kerberos/KerberosPacAuthDataTest.java

            dos.writeInt(Integer.reverseBytes(PacConstants.LOGON_INFO));
            dos.writeInt(Integer.reverseBytes(10));
            dos.writeLong(Long.reverseBytes(100));
    
            byte[] invalidVersionPac = baos.toByteArray();
    
            PACDecodingException e = assertThrows(PACDecodingException.class, () -> {
                new KerberosPacAuthData(invalidVersionPac, keys);
            });
            assertTrue(e.getMessage().contains("PAC"));
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/io/FilesTest.java

      }
    
      public void testToByteArray() throws IOException {
        File asciiFile = getTestFile("ascii.txt");
        File i18nFile = getTestFile("i18n.txt");
        assertThat(Files.toByteArray(asciiFile)).isEqualTo(ASCII.getBytes(US_ASCII));
        assertThat(Files.toByteArray(i18nFile)).isEqualTo(I18N.getBytes(UTF_8));
        assertThat(Files.asByteSource(i18nFile).read()).isEqualTo(I18N.getBytes(UTF_8));
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 18:44:53 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/smb1/NtlmContextTest.java

                    | NtlmFlags.NTLMSSP_NEGOTIATE_SIGN;
            Type2Message type2Message = new Type2Message(type2Flags, serverChallenge, domain);
            byte[] type2Token = type2Message.toByteArray();
    
            // State 2: Process Type 2 and generate Type 3
            byte[] type3Token = context.initSecContext(type2Token, 0, type2Token.length);
    
            assertNotNull(type3Token);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/compression/DefaultCompressionService.java

                    int compressedSize = deflater.deflate(buffer);
                    baos.write(buffer, 0, compressedSize);
                }
    
                deflater.end();
                return baos.toByteArray();
            } catch (Exception e) {
                throw new CIFSException("LZ77 compression failed", e);
            }
        }
    
        /**
         * Decompresses LZ77 data.
         */
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  9. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/ntlm/JcifsEngine.java

            final Type1Message type1Message = new Type1Message(cifsContext, TYPE_1_FLAGS, domain, workstation);
            return Base64.getEncoder().encodeToString(type1Message.toByteArray());
        }
    
        /**
         * Generates a Type 3 NTLM message.
         *
         * @param username the username
         * @param password the password
         * @param domain the domain
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Dec 11 08:38:29 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

        return Signature.getInstance(tbsCertificate.signatureAlgorithmName).run {
          initVerify(issuer)
          update(signedData.toByteArray())
          verify(signatureValue.byteString.toByteArray())
        }
      }
    
      fun toX509Certificate(): X509Certificate {
        val data = CertificateAdapters.certificate.toDer(this)
        try {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.4K bytes
    - Viewed (0)
Back to top