public interface ResourcePoolEntry
Modifier and Type | Interface and Description |
---|---|
static class |
ResourcePoolEntry.Type
Type of module data.
|
Modifier and Type | Method and 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.
|
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 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.
Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-Ubuntu+0-9b134-2ubuntu1