import java.util.Map;
import java.util.Scanner;
-import org.apache.commons.io.IOUtils;
import org.apache.sshd.agent.SshAgent;
import org.apache.sshd.agent.SshAgentFactory;
import org.apache.sshd.agent.local.LocalAgentFactory;
import org.apache.sshd.sftp.client.fs.SftpFileSystem;
import org.apache.sshd.sftp.client.fs.SftpFileSystemProvider;
import org.argeo.api.cms.CmsLog;
+import org.argeo.util.StreamUtils;
public class SshSync {
private final static CmsLog log = CmsLog.getLog(SshSync.class);
log.debug("Relative copied file " + relativeCopiedFile);
try (OutputStream out = Files.newOutputStream(copiedFile);
InputStream in = Files.newInputStream(testPath)) {
- IOUtils.copy(in, out);
+ StreamUtils.copy(in, out);
}
log.debug("Copied " + testPath + " to " + copiedFile);
Files.delete(testPath);
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.image.ImageTranscoder;
import org.apache.batik.transcoder.image.PNGTranscoder;
-import org.apache.commons.io.FilenameUtils;
public class SvgToPng {
public void convertSvgDir(Path sourceDir, Path targetDir, int width) {
- System.out.println("##\n## " + width + "px - " + sourceDir+"\n##");
+ System.out.println("##\n## " + width + "px - " + sourceDir + "\n##");
try {
if (targetDir == null)
targetDir = sourceDir.getParent().resolve(Integer.toString(width));
transcoder.addTranscodingHint(PNGTranscoder.KEY_HEIGHT, (float) width);
for (Path source : Files.newDirectoryStream(sourceDir, "*.svg")) {
- String baseName = FilenameUtils.getBaseName(source.toString());
+ // FIXME extract base name
+ String baseName = null; // = FilenameUtils.getBaseName(source.toString());
Path target = targetDir.resolve(baseName + ".png");
convertSvgFile(transcoder, source, target);
}
import java.util.Enumeration;
-import org.apache.commons.io.FilenameUtils;
import org.argeo.api.cms.CmsLog;
import org.eclipse.rap.rwt.application.Application;
import org.osgi.framework.Bundle;
String p = paths.nextElement();
if (p.endsWith(".e4xmi")) {
String e4xmiPath = bundle.getSymbolicName() + '/' + p;
- String name = '/' + FilenameUtils.removeExtension(FilenameUtils.getName(p));
+ // FIXME deal with base name
+ String name=null;// = '/' + FilenameUtils.removeExtension(FilenameUtils.getName(p));
addE4EntryPoint(application, name, e4xmiPath, getBaseProperties());
if (log.isDebugEnabled())
log.debug("Registered " + e4xmiPath + " as " + getContextName() + name);