204205206207208209210211212213
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); } }
5253545556575859
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); } }
6465666768697071
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); } }
7677787980818283
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); } }
8889909192939495
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); } }
101102103104105106107108
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); } }
114115116117118119120121
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); } }
127128129130131132133134135136
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; } }
151152153154155156157158
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); } }
666768697071727374
/* (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(); }