Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for setResponseBody (0.13 sec)

  1. fess-crawler/src/test/java/org/codelibs/fess/crawler/rule/impl/SitemapsRuleTest.java

            responseData.setResponseBody(file, false);
            return responseData;
        }
    
        private ResponseData getTestData2_OK() {
            final ResponseData responseData = new ResponseData();
            responseData.setUrl("http://example.com/sitemap.xml.gz");
            File file = ResourceUtil.getResourceAsFile("sitemaps/sitemap1.xml.gz");
            responseData.setResponseBody(file, false);
            return responseData;
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. fess-crawler/src/test/java/org/codelibs/fess/crawler/rule/impl/RuleManagerImplTest.java

            final ResponseData responseData = new ResponseData();
            responseData.setUrl("http://www.example.com/sitemap1.xml");
            File file = ResourceUtil.getResourceAsFile("sitemaps/sitemap1.xml");
            responseData.setResponseBody(file, false);
            final Rule rule = ruleManager.getRule(responseData);
            assertNotNull(rule);
            assertEquals("sitemapsRule", rule.getRuleId());
            CloseableUtil.closeQuietly(responseData);
        }
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/TextTransformerTest.java

            final ResponseData responseData = new ResponseData();
            responseData.setUrl("file:/test.txt");
            responseData.setCharSet(Constants.UTF_8);
            responseData.setResponseBody(data);
            responseData.setMimeType("text/plain");
            final ResultData resultData = textTransformer.transform(responseData);
            assertEquals("xyz", new String(resultData.getData(), resultData.getEncoding()));
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. fess-crawler/src/main/java/org/codelibs/fess/crawler/entity/ResponseData.java

                    throw new IORuntimeException(e);
                }
            }
            return null;
        }
    
        public void setResponseBody(final byte[] responseBody) {
            responseBodyBytes = responseBody;
        }
    
        public void setResponseBody(final File responseBody, final boolean isTemporary) {
            responseBodyFile = responseBody;
            isTemporaryFile = isTemporary;
        }
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Sat Oct 12 01:40:57 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/fs/FileSystemClient.java

                            if (file.length() < maxCachedContentSize) {
                                try (InputStream contentStream = new BufferedInputStream(new FileInputStream(file))) {
                                    responseData.setResponseBody(InputStreamUtil.getBytes(contentStream));
                                } catch (final Exception e) {
                                    logger.warn("I/O Exception.", e);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:47:32 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  6. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/HtmlTransformerTest.java

        public void test_transform() {
            final byte[] data = new String("xyz").getBytes();
            final ResponseData responseData = new ResponseData();
            responseData.setUrl("http://hoge/");
            responseData.setResponseBody(data);
            responseData.setCharSet("ISO-8859-1");
            final ResultData resultData = htmlTransformer.transform(responseData);
            assertEquals("xyz", new String(resultData.getData()));
        }
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  7. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/smb/SmbClient.java

                                try (InputStream contentStream = new BufferedInputStream(new SmbFileInputStream(file))) {
                                    responseData.setResponseBody(InputStreamUtil.getBytes(contentStream));
                                } catch (final Exception e) {
                                    logger.warn("I/O Exception.", e);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu May 23 01:54:36 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  8. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/BinaryTransformerTest.java

        }
    
        public void test_transform() {
            final byte[] data = new String("xyz").getBytes();
            final ResponseData responseData = new ResponseData();
            responseData.setResponseBody(data);
            final ResultData resultData = binaryTransformer.transform(responseData);
            assertEquals("xyz", new String(resultData.getData()));
        }
    
        public void test_transform_null() {
            try {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/XmlTransformerTest.java

                    + "<field name=\"tel\">090-xxxx-xxxx</field>\n"//
                    + "</doc>";
    
            final ResponseData responseData = new ResponseData();
            responseData.setResponseBody(ResourceUtil.getResourceAsFile("extractor/test.xml"), false);
            responseData.setCharSet(Constants.UTF_8);
            final ResultData resultData = xmlTransformer.transform(responseData);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  10. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/smb1/SmbClient.java

                                try (InputStream contentStream = new BufferedInputStream(new SmbFileInputStream(file))) {
                                    responseData.setResponseBody(InputStreamUtil.getBytes(contentStream));
                                } catch (final Exception e) {
                                    logger.warn("I/O Exception.", e);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:47:32 UTC 2024
    - 18.9K bytes
    - Viewed (0)
Back to top