Class PathResource
- java.lang.Object
-
- org.apache.sshd.common.util.io.resource.AbstractIoResource<java.nio.file.Path>
-
- org.apache.sshd.common.util.io.resource.PathResource
-
- All Implemented Interfaces:
NamedResource,IoResource<java.nio.file.Path>,ResourceStreamProvider
public class PathResource extends AbstractIoResource<java.nio.file.Path>
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.file.OpenOption[]openOptions-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Constructor Summary
Constructors Constructor Description PathResource(java.nio.file.Path path)PathResource(java.nio.file.Path path, java.nio.file.OpenOption... openOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.OpenOption[]getOpenOptions()java.nio.file.PathgetPath()java.io.InputStreamopenInputStream()-
Methods inherited from class org.apache.sshd.common.util.io.resource.AbstractIoResource
getName, getResourceType, getResourceValue, toString
-
-
-
-
Method Detail
-
getPath
public java.nio.file.Path getPath()
-
getOpenOptions
public java.nio.file.OpenOption[] getOpenOptions()
-
openInputStream
public java.io.InputStream openInputStream() throws java.io.IOException- Returns:
- an
InputStreamfor the resource's data - Throws:
java.io.IOException- If failed to open the stream
-
-