Top Description Fields Constructors Methods
org.jboss.modules

pack-priv Class PathResource

extends Object
implements Resource
Class Inheritance
All Implemented Interfaces
org.jboss.modules.Resource
Imports
java.io.IOException, .InputStream, java.net.URL, java.nio.file.Files, .Path, java.security.AccessControlContext

Java NIO Path-based Resource
Author
Sergei Egorov

Field Summary

Modifier and TypeField and Description
private final AccessControlContext
context

Deprecated as a consequence of AccessControlContext being deprecated.
private final String
private final Path

Constructor Summary

AccessConstructor and Description
pack-priv
PathResource(Path path, final String name, AccessControlContext context)

Deprecated as a consequence of AccessControlContext being deprecated.

Method Summary

Modifier and TypeMethod and Description
public String
getName()

Implements org.jboss.modules.Resource.getName.

Get the relative resource name.
public long
getSize()

Implements org.jboss.modules.Resource.getSize.

Get the size of the resource, if known.
public URL
getURL()

Implements org.jboss.modules.Resource.getURL.

Get the complete URL of this resource.
public InputStream
openStream()

Implements org.jboss.modules.Resource.openStream.

Open an input stream to this resource.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final AccessControlContext context

Deprecated

as a consequence of AccessControlContext being deprecated. See corresponding docs for further information.

nameback to summary
private final String name
pathback to summary
private final Path path

Constructor Detail

PathResourceback to summary
pack-priv PathResource(Path path, final String name, AccessControlContext context)

Deprecated

as a consequence of AccessControlContext being deprecated. See corresponding docs for further information.

Method Detail

getNameback to summary
public String getName()

Implements org.jboss.modules.Resource.getName.

Doc from org.jboss.modules.Resource.getName.

Get the relative resource name.

Returns:String

the name

Annotations
@Override
getSizeback to summary
public long getSize()

Implements org.jboss.modules.Resource.getSize.

Doc from org.jboss.modules.Resource.getSize.

Get the size of the resource, if known.

Returns:long

the size, or 0L if unknown

Annotations
@Override
getURLback to summary
public URL getURL()

Implements org.jboss.modules.Resource.getURL.

Doc from org.jboss.modules.Resource.getURL.

Get the complete URL of this resource.

Returns:URL

the URL

Annotations
@Override
openStreamback to summary
public InputStream openStream() throws IOException

Implements org.jboss.modules.Resource.openStream.

Doc from org.jboss.modules.Resource.openStream.

Open an input stream to this resource.

Returns:InputStream

the stream

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs