Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for getSize (0.23 sec)

  1. src/test/java/org/codelibs/core/convert/TimeConversionUtilTest.java

            assertThat(new SimpleDateFormat("HH:mm:ss").format(calendar.getTime()), is("11:49:00"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToCalendar_MediumStyle() throws Exception {
            final Calendar calendar = toCalendar("11:49:10");
            assertThat(new SimpleDateFormat("HH:mm:ss").format(calendar.getTime()), is("11:49:10"));
        }
    
        /**
         * @throws Exception
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/convert/DoubleConversionUtil.java

            } else if (o instanceof java.util.Date) {
                if (pattern != null) {
                    return new Double(new SimpleDateFormat(pattern).format(o));
                }
                return new Double(((java.util.Date) o).getTime());
            } else {
                return toDouble(o.toString());
            }
        }
    
        private static Double toDouble(final String s) {
            if (StringUtil.isEmpty(s)) {
                return null;
            }
    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)
  3. src/test/java/org/codelibs/core/convert/CalendarConversionUtilTest.java

         */
        @Test
        public void testToCalendar() throws Exception {
            final Date date = new Date();
            final Calendar cal = CalendarConversionUtil.toCalendar(date);
            assertEquals(date, cal.getTime());
        }
    
        /**
         *
         * @throws Exception
         */
        @Test
        public void testLocalize() throws Exception {
            final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("JST"));
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/convert/ByteConversionUtil.java

            } else if (o instanceof java.util.Date) {
                if (pattern != null) {
                    return Byte.valueOf(new SimpleDateFormat(pattern).format(o));
                }
                return (byte) ((java.util.Date) o).getTime();
            } else if (o instanceof Boolean) {
                return ((Boolean) o) ? (byte) 1 : (byte) 0;
            } else {
                return toByte(o.toString());
            }
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/io/ResourceUtilTest.java

            assertEquals(getRoot() + "Program File", ResourceUtil.getFileName(url));
            url = ResourceUtil.getResource("java/lang/String.class");
            assertNull(ResourceUtil.getFile(url));
        }
    
        private String getRoot() throws IOException {
            final String root = new File("/").getCanonicalPath().replace('\\', '/');
            if (root.startsWith("/")) {
                return root;
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/core/convert/TimestampConversionUtilTest.java

        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToCalendar_MediumStyle() throws Exception {
            final Calendar calendar = toCalendar("2010/9/7 11:49:10", Locale.JAPAN);
            assertThat(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(calendar.getTime()), is("2010/09/07 11:49:10"));
        }
    
        /**
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/convert/LongConversionUtil.java

            } else if (o instanceof java.util.Date) {
                if (pattern != null) {
                    return Long.valueOf(new SimpleDateFormat(pattern).format(o));
                }
                return ((java.util.Date) o).getTime();
            } else if (o instanceof Boolean) {
                return ((Boolean) o) ? (long) 1 : (long) 0;
            } else {
                return toLong(o.toString());
            }
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/io/ResourceUtil.java

            assertArgumentNotNull("url", url);
    
            final String s = url.getFile();
            return URLUtil.decode(s, "UTF8");
        }
    
        /**
         * リソースのファイルを返します。
         *
         * @param url
         *            リソースのURL。{@literal null}であってはいけません
         * @return ファイル
         */
        public static File getFile(final URL url) {
            assertArgumentNotNull("url", url);
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/convert/TimestampConversionUtil.java

                final Date date = toDate(str, format);
                if (date != null) {
                    return new Timestamp(date.getTime());
                }
            }
            final Date date = toDate(str, locale);
            if (date != null) {
                return new Timestamp(date.getTime());
            }
            final Timestamp timestamp = toSqlTimestampJdbcEscape(str);
            if (timestamp != null) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/convert/BigDecimalConversionUtil.java

                if (pattern != null) {
                    return new BigDecimal(new SimpleDateFormat(pattern).format(o));
                }
                return new BigDecimal(Long.toString(((java.util.Date) o).getTime()));
            } else if (o instanceof String) {
                final String s = (String) o;
                if (StringUtil.isEmpty(s)) {
                    return null;
                }
                return normalize(new BigDecimal(s));
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.8K bytes
    - Viewed (0)
Back to top