Examples of IStorage


Examples of org.maqetta.server.IStorage

                URLConnection connection = source.openConnection();
                String path = source.getPath();
                String tail = path.substring(bundleDirName.length() + 1);
              
              //  File destination = new File("/Users/childsb/dev/workspaces/maqetta-workspace/childsb@us.ibm.com/project1/WebContent/app.css");
                IStorage destination = userDir.newInstance(userDir, tail);
               
                if (tail.indexOf(".svn") > -1) {
                    continue;
                }
                destination.getParentFile().mkdirs();
                InputStream in = null;
                OutputStream out = null;
                try {
                  in = connection.getInputStream();
                  out = new BufferedOutputStream(destination.getOutputStream());
                  byte[] buf = new byte[1024];
                  int len;
                  while ((len = in.read(buf)) > 0) {
                      out.write(buf, 0, len);
                  }
View Full Code Here

Examples of org.maqetta.server.IStorage

public class SetWorkbenchState extends Command {

    @Override
    public void handleCommand(HttpServletRequest req, HttpServletResponse resp, IUser user) throws IOException {
        IStorage settingsDir = user.getWorkbenchSettings();
        IStorage settingsFile = settingsDir.newInstance(settingsDir, IDavinciServerConstants.WORKBENCH_STATE_FILE);
        if (!user.isValid(settingsFile.getAbsolutePath())) {
          return;
        }
        if (settingsFile.exists()) {
          settingsFile.delete();
        }
        settingsFile.createNewFile();
        OutputStream os = new BufferedOutputStream(settingsFile.getOutputStream());
        Command.transferStreams(req.getInputStream(), os, false);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.