Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 12 for readAllBytes (0.38 seconds)

  1. src/test/java/org/codelibs/fess/suggest/SuggesterResourceLoadingTest.java

            }
        }
    
        /**
         * Test that resource content is properly read using readAllBytes.
         * Verifies that the new implementation correctly reads entire resource content.
         */
        @Test
        public void testResourceReading_readAllBytesCorrectness() throws Exception {
            // Read using the new method (readAllBytes)
            String contentNew;
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Mon Nov 24 03:40:05 GMT 2025
    - 9.6K bytes
    - Click Count (0)
  2. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/cisupport/CIDetectorHelperTest.java

                    .forEach(k -> processBuilder.environment().remove(k));
            Process process = processBuilder.start();
            process.waitFor();
            return new String(process.getInputStream().readAllBytes());
        }
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Sun Apr 13 18:50:07 GMT 2025
    - 3.4K bytes
    - Click Count (0)
  3. compat/maven-compat/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java

                Artifact artifact = createArtifact("artifact", "1.0");
    
                File file = new File(artifactBasedir, "artifact-1.0.jar");
                assertEquals("dummy", new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8).trim());
    
                artifactDeployer.deploy(file, artifact, remoteRepository(), localRepository());
    
                ArtifactRepository remoteRepository = remoteRepository();
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Wed Sep 17 10:01:14 GMT 2025
    - 2.9K bytes
    - Click Count (0)
  4. src/test/java/jcifs/smb/SmbFileIntegrationTest.java

                String sourceContent = new String(in.readAllBytes(), "UTF-8");
                assertEquals(content, sourceContent, "Source content should remain unchanged");
            }
    
            try (InputStream in = targetFile.getInputStream()) {
                String targetContent = new String(in.readAllBytes(), "UTF-8");
                assertEquals(content, targetContent, "Target content should match source");
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 56K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/io/ByteStreams.java

        }
        return result;
      }
    
      /**
       * Reads all bytes from an input stream into a byte array. Does not close the stream.
       *
       * <p><b>Java 9+ users:</b> use {@code in#readAllBytes()} instead.
       *
       * @param in the input stream to read from
       * @return a byte array containing all the bytes from the stream
       * @throws IOException if an I/O error occurs
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 31.1K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/io/Files.java

        return asByteSink(file, modes).asCharSink(charset);
      }
    
      /**
       * Reads all bytes from a file into a byte array.
       *
       * <p><b>{@link java.nio.file.Path} equivalent:</b> {@link java.nio.file.Files#readAllBytes}.
       *
       * @param file the file to read from
       * @return a byte array containing all the bytes from file
       * @throws IllegalArgumentException if the file is bigger than the largest possible byte array
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Jan 05 22:13:21 GMT 2026
    - 32.8K bytes
    - Click Count (0)
  7. fess-crawler-lasta/src/test/java/org/codelibs/fess/crawler/util/CrawlerWebServer.java

                // Update sitemaps.xml
                final File sitemapsXmlFile = new File(docRoot, "sitemaps.xml");
                if (sitemapsXmlFile.exists()) {
                    String content = new String(java.nio.file.Files.readAllBytes(sitemapsXmlFile.toPath()), "UTF-8");
                    content = content.replaceAll("localhost:\\d+", "localhost:" + actualPort);
                    java.nio.file.Files.write(sitemapsXmlFile.toPath(), content.getBytes("UTF-8"));
    Created: Sun Apr 12 03:50:13 GMT 2026
    - Last Modified: Thu Jan 15 01:11:43 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  8. api/maven-api-core/src/test/java/org/apache/maven/api/services/SourcesTest.java

            Files.writeString(testFile, content);
    
            Source source = Sources.fromPath(testFile);
            try (InputStream inputStream = source.openStream()) {
                String readContent = new String(inputStream.readAllBytes());
                assertEquals(content, readContent);
            }
        }
    
        @Test
        void testNullHandling() {
            assertThrows(NullPointerException.class, () -> Sources.fromPath(null));
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Mon Sep 29 14:45:25 GMT 2025
    - 5.4K bytes
    - Click Count (0)
  9. src/main/java/org/codelibs/fess/suggest/Suggester.java

                if (is == null) {
                    throw new IOException("Resource not found: suggest_indices/suggest/mappings-default.json");
                }
                return new String(is.readAllBytes(), StandardCharsets.UTF_8);
            }
        }
    
        private String getDefaultIndexSettings() throws IOException {
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Sun Feb 01 12:48:24 GMT 2026
    - 21.6K bytes
    - Click Count (3)
  10. src/main/java/org/codelibs/curl/io/ContentCache.java

         */
        public byte[] getContentAsBytes() throws IOException {
            if (data != null) {
                return data.clone();
            }
            return Files.readAllBytes(file.toPath());
        }
    
        @Override
        public void close() throws IOException {
            if (file != null) {
                Files.delete(file.toPath());
            }
        }
    
        /**
    Created: Thu Apr 02 15:34:12 GMT 2026
    - Last Modified: Sat Mar 21 09:11:12 GMT 2026
    - 4.8K bytes
    - Click Count (0)
Back to Top