public interface ResourcePoolEntry
Modifier and Type | Interface | Description |
---|---|---|
static class |
ResourcePoolEntry.Type |
Type of module data.
|
Modifier and Type | Method | Description |
---|---|---|
InputStream |
content() |
The ResourcePoolEntry content as an InputStream.
|
default byte[] |
contentBytes() |
The ResourcePoolEntry content as an array of bytes.
|
long |
contentLength() |
The ResourcePoolEntry content length.
|
default ResourcePoolEntry |
copyWithContent(byte[] content) |
Create a ResourcePoolEntry with new content but other information
copied from this ResourcePoolEntry.
|
default ResourcePoolEntry |
copyWithContent(Path file) |
Create a ResourcePoolEntry with new content but other information
copied from this ResourcePoolEntry.
|
static ResourcePoolEntry |
create(String path,
byte[] content) |
Create a ResourcePoolEntry for a resource of type
ResourcePoolEntry.Type.CLASS_OR_RESOURCE . |
static ResourcePoolEntry |
create(String path,
Path file) |
Create a ResourcePoolEntry for a resource of type
ResourcePoolEntry.Type.CLASS_OR_RESOURCE . |
static ResourcePoolEntry |
create(String path,
ResourcePoolEntry.Type type,
byte[] content) |
Create a ResourcePoolEntry for a resource of the given type.
|
static ResourcePoolEntry |
create(String path,
ResourcePoolEntry.Type type,
Path file) |
Create a ResourcePoolEntry for a resource of the given type.
|
static ResourcePoolEntry |
createSymLink(String path,
ResourcePoolEntry.Type type,
ResourcePoolEntry target) |
Create a ResourcePoolEntry for a resource the given path and type.
|
default ResourcePoolEntry |
linkedTarget() |
Returns a target linked with this entry.
|
String |
moduleName() |
The module name of this ResourcePoolEntry.
|
String |
path() |
The path of this ResourcePoolEntry.
|
ResourcePoolEntry.Type |
type() |
The ResourcePoolEntry's type.
|
default void |
write(OutputStream out) |
Write the content of this ResourcePoolEntry to an OutputStream.
|
String moduleName()
String path()
ResourcePoolEntry.Type type()
long contentLength()
InputStream content()
default ResourcePoolEntry linkedTarget()
null
.default byte[] contentBytes()
default void write(OutputStream out)
out
- the output streamdefault ResourcePoolEntry copyWithContent(byte[] content)
content
- The new resource content.default ResourcePoolEntry copyWithContent(Path file)
file
- The new resource content.static ResourcePoolEntry create(String path, ResourcePoolEntry.Type type, byte[] content)
path
- The resource path.type
- The ResourcePoolEntry type.content
- The resource content.static ResourcePoolEntry create(String path, byte[] content)
ResourcePoolEntry.Type.CLASS_OR_RESOURCE
.path
- The resource path.content
- The resource content.static ResourcePoolEntry create(String path, ResourcePoolEntry.Type type, Path file)
path
- The resource path.type
- The ResourcePoolEntry type.file
- The resource file.static ResourcePoolEntry create(String path, Path file)
ResourcePoolEntry.Type.CLASS_OR_RESOURCE
.path
- The resource path.file
- The resource file.static ResourcePoolEntry createSymLink(String path, ResourcePoolEntry.Type type, ResourcePoolEntry target)
path
- The resource path.type
- The ResourcePoolEntry type.target
- The target entry Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 2015, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-Ubuntu+0-9b151-2