Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for addMaxLength (0.07 sec)

  1. fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/ContentLengthHelper.java

     *
     */
    public class ContentLengthHelper {
    
        protected long defaultMaxLength = 10L * 1024L * 1024L;// 10M
    
        protected Map<String, Long> maxLengthMap = new HashMap<>();
    
        public void addMaxLength(final String mimeType, final long maxLength) {
            if (StringUtil.isBlank(mimeType)) {
                throw new CrawlerSystemException("MIME type is a blank.");
            }
            if (maxLength < 0) {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. fess-crawler/src/test/java/org/codelibs/fess/crawler/helper/ContentLengthHelperTest.java

        }
    
        public void test_getMaxLength() {
            final String mimeType = "text/plain";
    
            assertEquals(DEFAULT_MAX_LENGTH, contentLengthHelper.getMaxLength(mimeType));
            contentLengthHelper.addMaxLength(mimeType, 1000L);
            assertEquals(1000L, contentLengthHelper.getMaxLength(mimeType));
        }
    
        public void test_getMaxLength_blank() {
            String mimeType;
    
            mimeType = null;
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2K bytes
    - Viewed (0)
Back to top