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