@@ -0,0 +1,1306 @@
+package jp.number64.fileoperation;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.net.URI;%0Aimport java.nio.file.Path;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class FilesClassSample %7B%0A    private static final Logger LOGGER = LoggerFactory.getLogger(FilesClassSample.class);%0A%0A    /**%0A     * Capture a web page, and Write it to local file. %3Cbr%3E%0A     * @param targetUri InputStream target%0A     * @param outputPath Output target (filepath)%0A     * @return captured text%0A     * @see java.nio.file.Files#copy(java.nio.file.Path, java.io.OutputStream)%0A     */%0A    public String captureAndSaveWebPage(String targetUri, String outputPath) throws IOException %7B%0A        LOGGER.debug(%22** captureAndSaveWebPage%22);%0A%0A        LOGGER.debug(%22** URI: %7B%7D%22, targetUri);%0A        LOGGER.debug(%22** FILEPATH: %7B%7D%22, outputPath);%0A%0A        File outputFile = new File(outputPath);%0A        if (!outputFile.getParentFile().isDirectory()) %7B%0A            throw new IOException(%22Invalid path: not directory.%22);%0A        %7D%0A        Path path = outputFile.toPath();%0A%0A        URI uri = URI.create(targetUri);%0A%0A        try (InputStream in = uri.toURL().openStream()) %7B%0A           // Long captureSize = Files.copy(uri.in, target, options)%0A%0A        %7D%0A%0A        return null;%0A    %7D%0A%0A%0A%7D%0A

Store temporarily (rebase later)