Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 47 for getResourceAsStream (0.26 sec)

  1. fess-crawler/src/test/java/org/codelibs/fess/crawler/extractor/impl/TextExtractorTest.java

            textExtractor = container.getComponent("textExtractor");
        }
    
        public void test_getText() {
            final InputStream in = ResourceUtil.getResourceAsStream("extractor/test.txt");
            final String content = textExtractor.getText(in, null).getContent();
            CloseableUtil.closeQuietly(in);
            logger.info(content);
            assertTrue(content.contains("テスト"));
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/xml/DomUtilTest.java

         */
        public void testToString() throws Exception {
            final DocumentBuilder builder = DocumentBuilderFactoryUtil.newDocumentBuilder();
            final Document doc = DocumentBuilderUtil.parse(builder, ResourceUtil.getResourceAsStream("org/codelibs/core/xml/test1.xml"));
            final Element root = doc.getDocumentElement();
            final String contents = DomUtil.toString(root);
            System.out.println(contents);
        }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. fess-crawler/src/test/java/org/codelibs/fess/crawler/extractor/impl/MsExcelExtractorTest.java

            msExcelExtractor = container.getComponent("msExcelExtractor");
        }
    
        public void test_getText() {
            final InputStream in = ResourceUtil.getResourceAsStream("extractor/msoffice/test.xls");
            final String content = msExcelExtractor.getText(in, null).getContent();
            CloseableUtil.closeQuietly(in);
            logger.info(content);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2K bytes
    - Viewed (0)
  4. fess-crawler/src/test/java/org/codelibs/fess/crawler/extractor/impl/MsPowerPointExtractorTest.java

            msPowerPointExtractor = container.getComponent("msPowerPointExtractor");
        }
    
        public void test_getText() {
            final InputStream in = ResourceUtil.getResourceAsStream("extractor/msoffice/test.ppt");
            final String content = msPowerPointExtractor.getText(in, null).getContent();
            CloseableUtil.closeQuietly(in);
            logger.info(content);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. fess-crawler/src/test/java/org/codelibs/fess/crawler/helper/impl/MimeTypeHelperImplTest.java

            final MimeTypeHelper mimeTypeHelper = container.getComponent("mimeTypeHelper");
            if (path != null) {
                try (final InputStream is = ResourceUtil.getResourceAsStream(path)) {
                    assertEquals(expect, mimeTypeHelper.getContentType(is, name));
                }
            } else {
                assertEquals(expect, mimeTypeHelper.getContentType(null, name));
            }
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  6. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt

            String.format(
              "/hpack-test-case/%s/story_%02d.json",
              testFolderName,
              i,
            )
          val storyInputStream =
            HpackJsonUtil::class.java.getResourceAsStream(storyResourceName)
              ?: break
          try {
            storyInputStream.use {
              val story =
                readStory(storyInputStream.source().buffer())
                  .copy(fileName = storyResourceName)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. fess-crawler/src/test/java/org/codelibs/fess/crawler/extractor/impl/MsWordExtractorTest.java

            msWordExtractor = container.getComponent("msWordExtractor");
        }
    
        public void test_getText() {
            final InputStream in = ResourceUtil.getResourceAsStream("extractor/msoffice/test.doc");
            final String content = msWordExtractor.getText(in, null).getContent();
            CloseableUtil.closeQuietly(in);
            logger.info(content);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/net/MimeTypeUtil.java

         * @return コンテントタイプ
         */
        public static String guessContentType(final String path) {
            assertArgumentNotEmpty("path", path);
    
            final InputStream is = ResourceUtil.getResourceAsStream(path);
            try {
                final String mimetype = URLConnection.guessContentTypeFromStream(is);
                if (mimetype != null) {
                    return mimetype;
                }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  9. compat/maven-model/src/test/java/org/apache/maven/model/v4/MavenModelVersionTest.java

    class MavenModelVersionTest {
    
        private static Model model;
    
        @BeforeAll
        static void setup() throws Exception {
            try (InputStream is = MavenModelVersionTest.class.getResourceAsStream("/xml/pom.xml")) {
                model = new MavenStaxReader().read(is);
            }
        }
    
        @Test
        void testV4Model() {
            assertEquals("4.0.0", new MavenModelVersion().getModelVersion(model));
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/net/MimeTypeUtilTest.java

            final String path = ClassUtil.getPackageName(this.getClass()).replaceAll("\\.", "/") + "/bbb.html";
            final String s = URLConnection.guessContentTypeFromStream(ResourceUtil.getResourceAsStream(path));
            assertNull(s);
            final String contentType = MimeTypeUtil.guessContentType(path);
            assertEquals("text/html", contentType);
        }
    
        /**
         * Test method for
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 2.7K bytes
    - Viewed (0)
Back to top