Search Options

Results per page
Sort
Preferred Languages
Advance

Results 181 - 190 of 277 for setBytes (0.05 sec)

  1. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

          // [9-127) includes all ascii non-control characters
          sb.append((char) (random.nextInt(127 - 9) + 9));
        }
        String string = sb.toString();
        sb.setLength(0);
        data = ByteSource.wrap(string.getBytes(charset));
      }
    
      @Benchmark
      public int timeCopy(int reps) throws IOException {
        int r = 0;
        Charset localCharset = charset;
        ByteSource localData = data;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/com/SmbComSessionSetupAndXTest.java

        private SmbComNegotiateResponse mockNegotiate;
        @Mock
        private ServerMessageBlock mockAndX;
        @Mock
        private Configuration mockConfig;
    
        private static byte[] blobCred() {
            return "blobdata".getBytes(StandardCharsets.UTF_8);
        }
    
        @BeforeEach
        void setup() {
            when(mockContext.getConfig()).thenReturn(mockConfig);
            when(mockNegotiate.getServerData()).thenReturn(new ServerDataStub());
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/pac/kerberos/KerberosTokenTest.java

        }
    
        /**
         * Test constructor with a malformed token (not ASN.1).
         */
        @Test
        void testConstructorWithMalformedToken() {
            byte[] malformedToken = "This is not a valid token".getBytes();
            assertThrows(PACDecodingException.class, () -> new KerberosToken(malformedToken));
        }
    
        /**
         * Test constructor with a token that has an incorrect OID.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/dict/DictionaryCreator.java

         *
         * @param path the file path to encode
         * @return the Base64 encoded path
         */
        protected String encodePath(final String path) {
            return Base64.getUrlEncoder().encodeToString(path.getBytes(Constants.CHARSET_UTF_8));
        }
    
        /**
         * Checks if the given path matches this creator's pattern.
         *
         * @param path the file path to check
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/SmbComNegotiateTest.java

         * It should write the dialect string to the destination array.
         */
        @Test
        void testWriteBytesWireFormat() throws UnsupportedEncodingException {
            byte[] expectedBytes = DIALECTS.getBytes("ASCII");
            byte[] dst = new byte[expectedBytes.length];
            int dstIndex = 0;
    
            // Execute the method to write bytes
            int bytesWritten = smbComNegotiate.writeBytesWireFormat(dst, dstIndex);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4K bytes
    - Viewed (0)
  6. src/test/java/jcifs/pac/PacTest.java

            keys = new HashMap<>();
            // Use ARCFOUR-HMAC encryption type (23) which matches KERB_CHECKSUM_HMAC_MD5
            KerberosKey serverKey = new KerberosKey(new KerberosPrincipal("******@****.***"), "serverKey1234567".getBytes(),
                    PacSignature.ETYPE_ARCFOUR_HMAC, 1);
            keys.put(PacSignature.ETYPE_ARCFOUR_HMAC, serverKey);
        }
    
        private void writeLittleEndianInt(ByteArrayOutputStream baos, int value) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/FilesTest.java

        File asciiFile = getTestFile("ascii.txt");
        File i18nFile = getTestFile("i18n.txt");
        assertTrue(Arrays.equals(ASCII.getBytes(US_ASCII), Files.toByteArray(asciiFile)));
        assertTrue(Arrays.equals(I18N.getBytes(UTF_8), Files.toByteArray(i18nFile)));
        assertTrue(Arrays.equals(I18N.getBytes(UTF_8), Files.asByteSource(i18nFile).read()));
      }
    
      /** A {@link File} that provides a specialized value for {@link File#length()}. */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/ByteSinkTester.java

          suite.addTest(stringSuite);
        }
        return suite;
      }
    
      private static TestSuite suiteForString(
          String name, ByteSinkFactory factory, String string, String desc) {
        byte[] bytes = string.getBytes(UTF_8);
        TestSuite suite = suiteForBytes(name, factory, desc, bytes);
        CharSinkFactory charSinkFactory = SourceSinkFactories.asCharSinkFactory(factory);
        suite.addTest(
            CharSinkTester.suiteForString(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/ByteSinkTester.java

          suite.addTest(stringSuite);
        }
        return suite;
      }
    
      private static TestSuite suiteForString(
          String name, ByteSinkFactory factory, String string, String desc) {
        byte[] bytes = string.getBytes(UTF_8);
        TestSuite suite = suiteForBytes(name, factory, desc, bytes);
        CharSinkFactory charSinkFactory = SourceSinkFactories.asCharSinkFactory(factory);
        suite.addTest(
            CharSinkTester.suiteForString(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/fess/util/JobProcessTest.java

        private static class MockProcess extends Process {
            private final InputStream inputStream;
    
            public MockProcess(String output) {
                this.inputStream = new ByteArrayInputStream(output.getBytes());
            }
    
            @Override
            public OutputStream getOutputStream() {
                return null;
            }
    
            @Override
            public InputStream getInputStream() {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Jul 12 07:34:10 UTC 2025
    - 8.5K bytes
    - Viewed (0)
Back to top