Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 222 for getBytes (0.17 sec)

  1. maven-core/src/test/java/org/apache/maven/project/ExtensionDescriptorBuilderTest.java

        }
    
        @AfterEach
        void tearDown() throws Exception {
            builder = null;
        }
    
        private InputStream toStream(String xml) {
            return new ByteArrayInputStream(xml.getBytes(StandardCharsets.UTF_8));
        }
    
        @Test
        void testEmptyDescriptor() throws Exception {
            String xml = "<extension></extension>";
    
            ExtensionDescriptor ed = builder.build(toStream(xml));
    
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/ResourcesTest.java

      }
    
      public void testToByteArray() throws IOException {
        URL resource = getClass().getResource("testdata/i18n.txt");
        assertThat(Resources.toByteArray(resource)).isEqualTo(I18N.getBytes(Charsets.UTF_8));
      }
    
      public void testReadLines() throws IOException {
        // TODO(chrisn): Check in a better resource
        URL resource = getClass().getResource("testdata/i18n.txt");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Utf8.java

    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public final class Utf8 {
      /**
       * Returns the number of bytes in the UTF-8-encoded form of {@code sequence}. For a string, this
       * method is equivalent to {@code string.getBytes(UTF_8).length}, but is more efficient in both
       * time and space.
       *
       * @throws IllegalArgumentException if {@code sequence} contains ill-formed UTF-16 (unpaired
       *     surrogates)
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/ByteArrayDataOutput.java

      void writeChars(String s);
    
      @Override
      void writeUTF(String s);
    
      /**
       * @deprecated This method is dangerous as it discards the high byte of every character. For
       *     UTF-8, use {@code write(s.getBytes(StandardCharsets.UTF_8))}.
       */
      @Deprecated
      @Override
      void writeBytes(String s);
    
      /** Returns the contents that have been written to this instance, as a byte array. */
      byte[] toByteArray();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/fess/dict/DictionaryManagerTest.java

            testDir.delete();
            testDir.mkdirs();
            file1 = new File(testDir, "synonym.txt");
            FileUtil.writeBytes(file1.getAbsolutePath(), "abc=>123\nxyz,890".getBytes(Constants.UTF_8));
        }
    
        @Override
        public void tearDown() throws Exception {
            super.tearDown();
            FileUtils.deleteDirectory(testDir);
        }
    
        public void test_init() {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

          random.nextBytes(bytes);
          String s = new String(bytes, UTF_16LE); // so all random strings are valid
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putBytes(s.getBytes(UTF_16LE)).hash());
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  7. 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(Charsets.UTF_8);
        TestSuite suite = suiteForBytes(name, factory, desc, bytes);
        CharSinkFactory charSinkFactory = SourceSinkFactories.asCharSinkFactory(factory);
        suite.addTest(
            CharSinkTester.suiteForString(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 4K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/app/web/cache/CacheAction.java

            }
    
            final StreamResponse response = asStream(DocumentUtil.getValue(doc, fessConfig.getIndexFieldDocId(), String.class))
                    .contentType("text/html; charset=UTF-8").data(content.getBytes(Constants.CHARSET_UTF_8));
            response.headerContentDispositionInline(); // TODO will be fixed in lastaflute
            return response;
        }
    
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/io/InputStreamUtil.java

         * <p>
         * 入力ストリームはクローズされません。
         * </p>
         *
         * @param is
         *            入力ストリーム。{@literal null}であってはいけません
         * @return byteの配列
         */
        public static final byte[] getBytes(final InputStream is) {
            assertArgumentNotNull("is", is);
    
            final ByteArrayOutputStream os = new ByteArrayOutputStream(BUF_SIZE);
            CopyUtil.copy(is, os);
            return os.toByteArray();
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/fess/helper/OsddHelperTest.java

                              <InputEncoding>UTF-8</InputEncoding>
                              <OutputEncoding>UTF-8</OutputEncoding>
                            </OpenSearchDescription>
                            """, new String(InputStreamUtil.getBytes(ins)));
                }
    
                @Override
                public OutputStream stream() {
                    return null;
                }
            });
        }
    
        public void test_init_osddpath_null() {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 5.8K bytes
    - Viewed (0)
Back to top