Package com.adito.vfs.webdav

Examples of com.adito.vfs.webdav.DAVException


      if (readOnly) {
        mount.setReadOnly(true);
      }
      return mount;
    } catch (NoPermissionException npe) {
      throw new DAVException(DAVStatus.SC_FORBIDDEN, "Policy does not allow you access to this resource.", npe);
    } catch (Exception e) {
      throw new DAVException(DAVStatus.SC_INTERNAL_SERVER_ERROR, "Failed to create mount.", e);
    }
  }
View Full Code Here


            else {
                throw new IOException("DAV resource is not a true file.");
            }
        } catch (IOException e) {
            String message = "Unable to read from resource";
            throw new DAVException (403, message, e, resource);
        }
    }
View Full Code Here

    public int read() {
        if (this.input == null) throw new IllegalStateException("Closed");
        try {
            return input.read();
        } catch (IOException e) {
            throw new DAVException(403, "Can't read data", e, this.resource);
        }
    }
View Full Code Here

    public int read(byte b[]) {
        if (this.input == null) throw new IllegalStateException("Closed");
        try {
            return input.read(b);
        } catch (IOException e) {
            throw new DAVException(403, "Can't read data", e, this.resource);
        }
    }
View Full Code Here

    public int read(byte b[], int off, int len) {
        if (this.input == null) throw new IllegalStateException("Closed");
        try {
            return input.read(b, off, len);
        } catch (IOException e) {
            throw new DAVException(403, "Can't read data", e, this.resource);
        }
    }
View Full Code Here

    public long skip(long n) {
        if (this.input == null) throw new IllegalStateException("Closed");
        try {
            return input.skip(n);
        } catch (IOException e) {
            throw new DAVException(403, "Can't skip over", e, this.resource);
        }
    }
View Full Code Here

    public int available() {
        if (this.input == null) throw new IllegalStateException("Closed");
        try {
            return input.available();
        } catch (IOException e) {
            throw new DAVException(403, "Can't skip over", e, this.resource);
        }
    }
View Full Code Here

    public void close() {
        if (this.input == null) return;
        try {
            this.input.close();
        } catch (IOException e) {
            throw new DAVException(403, "Can't close", e, this.resource);
        } finally {
            this.input = null;
        }
    }
View Full Code Here

    public void reset() {
        if (this.input == null) throw new IllegalStateException("Closed");
        try {
            input.reset();
        } catch (IOException e) {
            throw new DAVException(403, "Can't reset", e, this.resource);
        }
    }
View Full Code Here

    /* (non-Javadoc)
     * @see com.adito.vfs.FileObjectVFSResource#delete()
     */
    public void delete() throws DAVMultiStatus, IOException {
        if (((AbstractNetworkPlaceMount) getMount()).getNetworkPlace().isNoDelete()) {
            throw new DAVException(500, "This resource cannot be deleted because the system policy does not allow deletion.");
        }
        super.delete();       
    }
View Full Code Here

TOP

Related Classes of com.adito.vfs.webdav.DAVException

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.