public interface WritableResource extends Resource
OutputStream accessor.OutputStream| Modifier and Type | Method and Description |
|---|---|
OutputStream |
getOutputStream()
Return an
OutputStream for the underlying resource,
allowing to (over-)write its content. |
default boolean |
isWritable()
Indicate whether the contents of this resource can be written
via
getOutputStream(). |
contentLength, createRelative, exists, getDescription, getFile, getFilename, getURI, getURL, isFile, isOpen, isReadable, lastModifiedgetInputStreamdefault boolean isWritable()
getOutputStream().
Will be true for typical resource descriptors;
note that actual content writing may still fail when attempted.
However, a value of false is a definitive indication
that the resource content cannot be modified.
getOutputStream(),
Resource.isReadable()OutputStream getOutputStream() throws IOException
OutputStream for the underlying resource,
allowing to (over-)write its content.IOException - if the stream could not be openedInputStreamSource.getInputStream()