Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 66 for try (0.12 sec)

  1. src/main/java/org/codelibs/core/lang/ClassLoaderUtil.java

         */
        public static Iterator<URL> getResources(final ClassLoader loader, final String name) {
            assertArgumentNotNull("loader", loader);
            assertArgumentNotEmpty("name", name);
    
            try {
                final Enumeration<URL> e = loader.getResources(name);
                return new EnumerationIterator<>(e);
            } catch (final IOException e) {
                throw new IORuntimeException(e);
            }
        }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/io/TraversalUtil.java

                this.prefix = prefix;
            }
    
            private void loadFromZip(final URL zipUrl) {
                final ZipInputStream zis = new ZipInputStream(URLUtil.openStream(zipUrl));
                try {
                    ZipEntry entry = null;
                    while ((entry = ZipInputStreamUtil.getNextEntry(zis)) != null) {
                        entryNames.add(entry.getName());
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/message/MessageFormatter.java

         *            メッセージコード
         * @param args
         *            引数
         * @return メッセージコードなしの単純なメッセージ
         */
        public static String getSimpleMessage(final String messageCode, final Object... args) {
            try {
                final String pattern = getPattern(messageCode);
                if (pattern != null) {
                    return MessageFormat.format(pattern, args);
                }
                return getNoPatternMessage(args);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. 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;
                }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/misc/DisposableUtil.java

        /**
         * 登録済みのリソースを全て破棄します。
         */
        public static synchronized void dispose() {
            while (!disposables.isEmpty()) {
                final Disposable disposable = disposables.removeLast();
                try {
                    disposable.dispose();
                } catch (final Throwable t) {
                    t.printStackTrace(); // must not use Logger.
                }
            }
            disposables.clear();
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/lang/ConstructorUtil.java

                throws InstantiationRuntimeException, IllegalAccessRuntimeException {
            assertArgumentNotNull("constructor", constructor);
    
            try {
                return constructor.newInstance(args);
            } catch (final InstantiationException e) {
                throw new InstantiationRuntimeException(constructor.getDeclaringClass(), e);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/io/ResourceTraversalUtil.java

                    if (!entryName.startsWith(prefix)) {
                        continue;
                    }
                    final InputStream is = JarFileUtil.getInputStream(jarFile, entry);
                    try {
                        handler.processResource(entryName.substring(pos), is);
                    } finally {
                        CloseableUtil.close(is);
                    }
                }
            }
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/beans/impl/BeanDescImpl.java

                }
            }
        }
    
        private void setFieldAccessible(Field field) {
            if (isExceptPrivateAccessible(field)) {
                return;
            }
            try {
                field.setAccessible(true);
            } catch (RuntimeException e) {
                throw new BeanFieldSetAccessibleFailureException(beanClass, field, e);
            }
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/convert/DateConversionUtil.java

         *
         * @param str
         *            文字列
         * @return 変換された{@link java.sql.Date}
         */
        protected static java.sql.Date toSqlDateJdbcEscape(final String str) {
            try {
                return java.sql.Date.valueOf(str);
            } catch (final IllegalArgumentException ex) {
                return null;
            }
        }
    
        /**
         * パターン文字列を区切り文字を含まないプレーンなパターン文字列に変換して返します。
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 21.5K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/log/Logger.java

         * 使えない場合はjava.util.loggingロガーを利用するためのファクトリを返します。
         * </p>
         *
         * @return ログアダプタのファクトリ
         */
        protected static LoggerAdapterFactory getLoggerAdapterFactory() {
            // TODO
            try {
                Class.forName("org.apache.commons.logging.LogFactory");
                return new JclLoggerAdapterFactory();
            } catch (final Throwable ignore) {
                return new JulLoggerAdapterFactory();
            }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 13.2K bytes
    - Viewed (0)
Back to top