Package net.sf.webdav.exceptions

Examples of net.sf.webdav.exceptions.WebdavException


      uri = normalizeURI(uri);
      log.tracef("GridStore.createResource(%s)", uri);
      File file = fs.getFile(root, uri);
      try {
         if (!file.createNewFile()) {
            throw new WebdavException("cannot create file: " + uri);
         }
      } catch (IOException e) {
         log.error("GridStore.createResource(" + uri + ") failed", e);
         throw new WebdavException(e);
      }
   }
View Full Code Here


            Util.close(is);
            Util.close(os);
         }
      } catch (IOException e) {
         log.error("GridStore.setResourceContent(" + uri + ") failed", e);
         throw new WebdavException(e);
      }
      long length = -1;

      try {
         length = file.length();
View Full Code Here

      try {
         String[] childrenNames = null;
         if (file.isDirectory()) {
            File[] children = file.listFiles();
            if (children == null)
               throw new WebdavException("IO error while listing files for " + file);
            List<String> childList = new ArrayList<String>();
            for (int i = 0; i < children.length; i++) {
               String name = children[i].getName();
               childList.add(name);
               log.trace("Child " + i + ": " + name);
            }
            childrenNames = new String[childList.size()];
            childrenNames = childList.toArray(childrenNames);
         }
         return childrenNames;
      } catch (Exception e) {
         log.error("GridStore.getChildrenNames(" + uri + ") failed", e);
         throw new WebdavException(e);
      }
   }
View Full Code Here

      uri = normalizeURI(uri);
      File file = fs.getFile(root, uri);
      boolean success = file.delete();
      log.tracef("GridStore.removeObject(%s)=%s", uri, success);
      if (!success)
         throw new WebdavException("cannot delete object: " + uri);
   }
View Full Code Here

      try {
         // in=new BufferedInputStream(fs.getInput(file));
         in = fs.getInput(file);
      } catch (IOException e) {
         log.error("GridStore.getResourceContent(" + uri + ") failed");
         throw new WebdavException(e);
      }
      return in;
   }
View Full Code Here

      fs = new GridFilesystem(data, metadata);

      this.root = fs.getFile(root.getPath());
      if (!this.root.mkdirs())
         throw new WebdavException("root path: " + root.getAbsolutePath() + " does not exist and could not be created");
   }
View Full Code Here

   @Override
   public ITransaction begin(Principal principal) throws WebdavException {
      log.trace("GridStore.begin()");
      if (!root.exists()) {
         if (!root.mkdirs()) {
            throw new WebdavException("root path: "
                                            + root.getAbsolutePath()
                                            + " does not exist and could not be created");
         }
      }
      return null;
View Full Code Here

   public void createFolder(ITransaction transaction, String uri) throws WebdavException {
      uri = normalizeURI(uri);
      log.tracef("GridStore.createFolder(%s)", uri);
      File file = fs.getFile(root, uri);
      if (!file.mkdir()) {
         throw new WebdavException("cannot create folder: " + uri);
      }
   }
View Full Code Here

      uri = normalizeURI(uri);
      log.tracef("GridStore.createResource(%s)", uri);
      File file = fs.getFile(root, uri);
      try {
         if (!file.createNewFile()) {
            throw new WebdavException("cannot create file: " + uri);
         }
      } catch (IOException e) {
         log.error("GridStore.createResource(" + uri + ") failed", e);
         throw new WebdavException(e);
      }
   }
View Full Code Here

            Util.close(is);
            Util.close(os);
         }
      } catch (IOException e) {
         log.error("GridStore.setResourceContent(" + uri + ") failed", e);
         throw new WebdavException(e);
      }
      long length = -1;

      try {
         length = file.length();
View Full Code Here

TOP

Related Classes of net.sf.webdav.exceptions.WebdavException

Copyright © 2018 www.massapicom. 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.