Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 99 for toFile (0.15 sec)

  1. src/main/java/org/codelibs/core/misc/DynamicProperties.java

        public DynamicProperties(final String path) {
            this(path == null ? null : new File(path));
        }
    
        public DynamicProperties(final Path path) {
            this(path == null ? null : path.toFile());
        }
    
        public DynamicProperties(final File file) {
            // check path
            if (file == null) {
                throw new FileAccessException("ECL0108");
            }
    
            this.propertiesFile = file;
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/net/URLUtil.java

        /**
         * URLが示すJarファイルの{@link File}オブジェクトを返します。
         *
         * @param fileUrl
         *            JarファイルのURL。{@literal null}であってはいけません
         * @return Jarファイルの{@link File}
         */
        public static File toFile(final URL fileUrl) {
            assertArgumentNotNull("fileUrl", fileUrl);
    
            try {
                final String path = URLDecoder.decode(fileUrl.getPath(), "UTF-8");
                return new File(path).getAbsoluteFile();
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/helper/PluginHelper.java

                    }
                } catch (final Exception e) {
                    throw new PluginException("Failed to install the artifact " + artifact.getName(), e);
                }
            } else {
                try (final InputStream in = new FileInputStream(url)) {
                    CopyUtil.copy(in, ResourceUtil.getPluginPath(fileName).toFile());
                } catch (final Exception e) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/io/FileUtilTest.java

    import org.junit.Test;
    
    /**
     * @author koichik
     *
     */
    public class FileUtilTest {
    
        URL url = ResourceUtil.getResource(getClass().getName().replace('.', '/') + ".txt");
    
        File inputFile = URLUtil.toFile(url);
    
        /**
         * @throws Exception
         */
        @Test
        public void testFileToFile() throws Exception {
            final byte[] bytes = readBytes(inputFile);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/thumbnail/ThumbnailManager.java

                if (varPath != null) {
                    baseDir = new File(varPath, THUMBNAILS_DIR_NAME);
                } else {
                    baseDir = ResourceUtil.getThumbnailPath().toFile();
                }
            }
            if (baseDir.mkdirs()) {
                logger.info("Created: {}", baseDir.getAbsolutePath());
            }
            if (!baseDir.isDirectory()) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 21.5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/io/TraversalUtil.java

         * @return ルートパッケージの上位となるベースディレクトリ
         */
        protected static File getBaseDir(final URL url, final String baseName) {
            assertArgumentNotNull("url", url);
    
            File file = URLUtil.toFile(url);
            final String[] paths = StringUtil.split(baseName, "/");
            for (final String path : paths) {
                file = file.getParentFile();
            }
            return file;
        }
    
        /**
    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)
  7. src/test/java/org/codelibs/core/io/CopyUtilTest.java

        StringWriter writer = new StringWriter();
    
        StringBuilder builder = new StringBuilder();
    
        URL url = ResourceUtil.getResource(getClass().getName().replace('.', '/') + ".txt");
    
        File inputFile = URLUtil.toFile(url);
    
        File outputFile = new File(inputFile.getParentFile(), ".out");
    
        /**
         * @throws Exception
         */
        @Test
        public void testIsToOs() throws Exception {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/core/net/URLUtilTest.java

            final File file = new File("Program Files/hoge.txt");
            final URL url = file.toURI().toURL();
            assertEquals(file.getAbsoluteFile(), URLUtil.toFile(url));
            assertEquals(file.getAbsoluteFile(), URLUtil.toFile(new URL("file:Program%20Files/hoge.txt")));
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/io/FileUtil.java

            assertArgumentNotEmpty("encoding", encoding);
    
            final URL url = ResourceUtil.getResource(path);
            if (url.getProtocol().equals("file")) {
                return readText(URLUtil.toFile(url), encoding);
            }
            final InputStream is = URLUtil.openStream(url);
            try {
                final Reader reader = ReaderUtil.create(new BufferedInputStream(is, DEFAULT_BUF_SIZE), encoding);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/io/PropertiesUtilTest.java

    /**
     * @author wyukawa
     *
     */
    public class PropertiesUtilTest {
    
        URL url = ResourceUtil.getResource(getClass().getName().replace('.', '/') + ".txt");
    
        File inputFile = URLUtil.toFile(url);
    
        /**
         *
         */
        @Rule
        public TemporaryFolder tempFolder = new TemporaryFolder();
    
        /**
         * @see org.junit.rules.ExpectedException
         */
        @Rule
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9.6K bytes
    - Viewed (0)
Back to top