Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for readUtf8 (0.2 sec)

  1. src/main/java/org/codelibs/core/io/FileUtil.java

         * @return 読み込んだテキスト
         */
        public static String readUTF8(final String path) {
            assertArgumentNotEmpty("path", path);
            return readText(path, UTF8);
        }
    
        /**
         * UTF8でファイルからテキストを読み込みます。
         *
         * @param file
         *            ファイル。{@literal null}であってはいけません
         * @return 読み込んだテキスト
         */
        public static String readUTF8(final File file) {
            assertArgumentNotNull("file", file);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/util/UpgradeUtil.java

            final String filePath = indexConfigPath + "/" + indexName + "/" + path;
            try {
                final String source = FileUtil.readUTF8(filePath);
                try (CurlResponse response =
                        ComponentUtil.getCurlHelper().post("/_configsync/file").param("path", path).body(source).execute()) {
                    if (response.getHttpStatusCode() == 200) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/dict/DictionaryManager.java

                }
    
                // TODO use stream
                try (CurlResponse response = ComponentUtil.getCurlHelper().post("/_configsync/file").param("path", dictFile.getPath())
                        .body(FileUtil.readUTF8(file)).execute()) {
                    final Map<String, Object> contentMap = response.getContent(OpenSearchCurl.jsonParser());
                    if (!Constants.TRUE.equalsIgnoreCase(contentMap.get("acknowledged").toString())) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 5K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/io/FileUtilTest.java

            assertThat(bytes, is("あいうえお".getBytes("UTF-8")));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testReadUTF8() throws Exception {
            assertThat(FileUtil.readUTF8(getPath("hoge_utf8.txt")), is("あ"));
        }
    
        private String getPath(final String fileName) {
            return getClass().getName().replace('.', '/').replaceFirst(getClass().getSimpleName(), fileName);
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/es/client/SearchEngineClient.java

                final String autoExpandReplicas) {
            final FessConfig fessConfig = ComponentUtil.getFessConfig();
            String source = FileUtil.readUTF8(indexConfigFile);
            String dictionaryPath = System.getProperty("fess.dictionary.path", StringUtil.EMPTY);
            if (StringUtil.isNotBlank(dictionaryPath) && !dictionaryPath.endsWith("/")) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 84.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

      }
    
      public void testNewDataInput_readUTF() {
        byte[] data = new byte[17];
        data[1] = 15;
        System.arraycopy("Kilroy was here".getBytes(Charsets.UTF_8), 0, data, 2, 15);
        ByteArrayDataInput in = ByteStreams.newDataInput(data);
        assertEquals("Kilroy was here", in.readUTF());
      }
    
      public void testNewDataInput_readChar() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/ByteStreams.java

          try {
            return input.readLine();
          } catch (IOException e) {
            throw new IllegalStateException(e);
          }
        }
    
        @Override
        public String readUTF() {
          try {
            return input.readUTF();
          } catch (IOException e) {
            throw new IllegalStateException(e);
          }
        }
      }
    
      /** Returns a new {@link ByteArrayDataOutput} instance with a default size. */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

      public double readDouble() throws IOException {
        return Double.longBitsToDouble(readLong());
      }
    
      @CanIgnoreReturnValue // to skip a field
      @Override
      public String readUTF() throws IOException {
        return new DataInputStream(in).readUTF();
      }
    
      /**
       * Reads a {@code short} as specified by {@link DataInputStream#readShort()}, except using
       * little-endian byte order.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        assertEquals(-12150, in.readShort());
        assertEquals(20675, in.readUnsignedShort());
        assertEquals(0xBEBAFECA, in.readInt());
        assertEquals(0xBEBAFECAEFBEADDEL, in.readLong());
        assertEquals("Herby Derby", in.readUTF());
        assertEquals(0xBEBAFECA, Float.floatToIntBits(in.readFloat()));
        assertEquals(0xBEBAFECAEFBEADDEL, Double.doubleToLongBits(in.readDouble()));
      }
    
      public void testSkipBytes() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        assertEquals(-12150, in.readShort());
        assertEquals(20675, in.readUnsignedShort());
        assertEquals(0xBEBAFECA, in.readInt());
        assertEquals(0xBEBAFECAEFBEADDEL, in.readLong());
        assertEquals("Herby Derby", in.readUTF());
        assertEquals(0xBEBAFECA, Float.floatToIntBits(in.readFloat()));
        assertEquals(0xBEBAFECAEFBEADDEL, Double.doubleToLongBits(in.readDouble()));
      }
    
      public void testSkipBytes() throws IOException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top