Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for setResponseBody (0.38 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/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)
  6. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/FileTransformerTest.java

            final byte[] data = new String("xyz").getBytes();
            final ResponseData responseData = new ResponseData();
            responseData.setUrl("http://www.example.com/submit?a=1&b=2");
            responseData.setResponseBody(data);
            responseData.setCharSet("UTF-8");
            setBaseDir();
            final ResultData resultData = fileTransformer.transform(responseData);
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top