public class PathResource extends AbstractIoResource<java.nio.file.Path>
Modifier and Type | Field and Description |
---|---|
private java.nio.file.OpenOption[] |
openOptions |
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Constructor and Description |
---|
PathResource(java.nio.file.Path path) |
PathResource(java.nio.file.Path path,
java.nio.file.OpenOption... openOptions) |
Modifier and Type | Method and Description |
---|---|
java.nio.file.OpenOption[] |
getOpenOptions() |
java.nio.file.Path |
getPath() |
java.io.InputStream |
openInputStream() |
getName, getResourceType, getResourceValue, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forResource
findByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByName
public PathResource(java.nio.file.Path path)
public PathResource(java.nio.file.Path path, java.nio.file.OpenOption... openOptions)
public java.nio.file.Path getPath()
public java.nio.file.OpenOption[] getOpenOptions()
public java.io.InputStream openInputStream() throws java.io.IOException
InputStream
for the resource's datajava.io.IOException
- If failed to open the stream