Class URLResource
- java.lang.Object
-
- org.apache.sshd.common.util.io.resource.AbstractIoResource<java.net.URL>
-
- org.apache.sshd.common.util.io.resource.URLResource
-
- All Implemented Interfaces:
NamedResource
,IoResource<java.net.URL>
,ResourceStreamProvider
public class URLResource extends AbstractIoResource<java.net.URL>
-
-
Field Summary
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Constructor Summary
Constructors Constructor Description URLResource(java.net.URL url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
java.net.URL
getURL()
java.io.InputStream
openInputStream()
-
Methods inherited from class org.apache.sshd.common.util.io.resource.AbstractIoResource
getResourceType, getResourceValue, toString
-
-
-
-
Method Detail
-
getURL
public java.net.URL getURL()
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceNamedResource
- Overrides:
getName
in classAbstractIoResource<java.net.URL>
- Returns:
- The resource name
-
openInputStream
public java.io.InputStream openInputStream() throws java.io.IOException
- Returns:
- an
InputStream
for the resource's data - Throws:
java.io.IOException
- If failed to open the stream
-
-