| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public String | |
| public URI | |
| public boolean | |
| public InputStream | |
| public OutputStream | |
| public default OutputStream | openOutputStream(boolean createIfNeeded)
Deprecated
use
openOutputStream(OpenOptions)
Opens an output stream to write to this resource using the default |
| public Resource | |
| public Resource |
| exists | back to summary |
|---|---|
public boolean exists()
| |
| getPath | back to summary |
|---|---|
| public String getPath() Returns the normalized, ResourceAccessor-relative path for this resource.
To get the unique location of this resource, use | |
| getUri | back to summary |
|---|---|
| public URI getUri() Returns a unique and complete identifier for this resource.
This will be different than what is returned by
For example, a file resource may return a path of | |
| isWritable | back to summary |
|---|---|
| public boolean isWritable() Return true if the resource can be written to | |
| openInputStream | back to summary |
|---|---|
| public InputStream openInputStream() throws IOException Opens an input stream to read from this resource.
| |
| openOutputStream | back to summary |
|---|---|
| public OutputStream openOutputStream(OpenOptions openOptions) throws IOException Opens an output stream given the passed | |
| openOutputStream | back to summary |
|---|---|
| public default OutputStream openOutputStream(boolean createIfNeeded) throws IOException
Deprecated Opens an output stream to write to this resource using the default
| |
| resolve | back to summary |
|---|---|
| public Resource resolve(String other) Resolve the given path against this resource. If other is an empty path then this method trivially returns this path. Otherwise this method considers this resource to be a directory and resolves the given path against this resource. Even if "other" begins with a `/`, the returned resource should be relative to this resource. | |
| resolveSibling | back to summary |
|---|---|
| public Resource resolveSibling(String other) Resolves the given path against this resource's parent path. This is useful where a file name needs to be replaced with another file name. For example, suppose that the name separator is "/" and a path represents "dir1/dir2/foo", then invoking this method with the Path "bar" will result in the Path "dir1/dir2/bar". If other is an empty path then this method returns this path's parent. Even if "other" begins with a `/`, the returned resource should be relative to this resource. | |