Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for getInstance (0.26 sec)

  1. src/test/java/org/codelibs/core/timer/TimeoutManagerTest.java

            assertNotNull(TimeoutManager.getInstance().thread);
            Thread.sleep(2000);
            assertEquals(count, expiredCount);
            assertEquals(1, TimeoutManager.getInstance().getTimeoutTaskCount());
            task.cancel();
            Thread.sleep(2000);
            assertEquals(0, TimeoutManager.getInstance().getTimeoutTaskCount());
            assertNull(TimeoutManager.getInstance().thread);
        }
    
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/security/MessageDigestUtil.java

         *             {@link NoSuchAlgorithmException}が発生した場合
         */
        public static MessageDigest getInstance(final String algorithm) {
            assertArgumentNotEmpty("algorithm", algorithm);
    
            try {
                return MessageDigest.getInstance(algorithm);
            } catch (final NoSuchAlgorithmException e) {
                throw new NoSuchAlgorithmRuntimeException(e);
            }
        }
    
        /**
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/crypto/CachedCipher.java

            Cipher cipher = encryptoQueue.poll();
            if (cipher == null) {
                final SecretKeySpec sksSpec = new SecretKeySpec(key.getBytes(), algorithm);
                try {
                    cipher = Cipher.getInstance(algorithm);
                    cipher.init(Cipher.ENCRYPT_MODE, sksSpec);
                } catch (final InvalidKeyException e) {
                    throw new InvalidKeyRuntimeException(e);
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/convert/CalendarConversionUtilTest.java

            assertEquals(date, cal.getTime());
        }
    
        /**
         *
         * @throws Exception
         */
        @Test
        public void testLocalize() throws Exception {
            final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("JST"));
            final Calendar local = CalendarConversionUtil.localize(calendar);
            assertEquals(TimeZone.getDefault(), local.getTimeZone());
        }
    
        /**
         * Test method for
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/convert/CalendarConversionUtil.java

                return (Calendar) o;
            }
            final java.util.Date date = DateConversionUtil.toDate(o, pattern);
            if (date != null) {
                final Calendar cal = Calendar.getInstance();
                cal.setTime(date);
                return cal;
            }
            return null;
        }
    
        /**
         * ローカルの{@link TimeZone}と{@link Locale}をもつ{@link Calendar}に変換します。
         *
         * @param calendar
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/convert/DateConversionUtil.java

         */
        protected static Calendar toCalendar(final Date date, final Locale locale) {
            final Calendar calendar;
            if (locale == null) {
                calendar = Calendar.getInstance();
            } else {
                calendar = Calendar.getInstance(locale);
            }
            calendar.setTime(date);
            return calendar;
        }
    
        /**
         * 文字列を{@link java.sql.Date}に変換します。
         *
         * @param str
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 21.5K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/timer/TimeoutManager.java

        private TimeoutManager() {
        }
    
        /**
         * シングルトン用のインスタンスを返します。
         *
         * @return シングルトン用のインスタンス
         */
        public static TimeoutManager getInstance() {
            return instance;
        }
    
        /**
         * 処理を開始します。
         */
        public synchronized void start() {
            if (thread == null) {
                thread = new Thread(this, "CoreLib-TimeoutManager");
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 8K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/convert/TimestampConversionUtil.java

         */
        protected static Calendar toCalendar(final Date date, final Locale locale) {
            final Calendar calendar;
            if (locale == null) {
                calendar = Calendar.getInstance();
            } else {
                calendar = Calendar.getInstance(locale);
            }
            calendar.setTime(date);
            return calendar;
        }
    
        /**
         * 文字列を{@link Timestamp}に変換します。
         *
         * @param str
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/io/FileUtil.java

                throw new IORuntimeException(e);
            }
        }
    
        public static void deleteInBackground(final File file) {
            if (file != null) {
                TimeoutManager.getInstance().addTimeoutTarget(() -> {
                    try {
                        Files.deleteIfExists(file.toPath());
                    } catch (final IOException e) {
                        throw new IORuntimeException(e);
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/convert/TimeConversionUtil.java

         */
        protected static Calendar toCalendar(final Date date, final Locale locale) {
            final Calendar calendar;
            if (locale == null) {
                calendar = Calendar.getInstance();
            } else {
                calendar = Calendar.getInstance(locale);
            }
            calendar.setTime(date);
            return calendar;
        }
    
        /**
         * 文字列を{@link Time}に変換します。
         *
         * @param str
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 21.2K bytes
    - Viewed (0)
Back to top