public interface ModuleEntry
Modifier and Type | Interface and Description |
---|---|
static class |
ModuleEntry.Type
Type of module data.
|
Modifier and Type | Method and Description |
---|---|
default ModuleEntry |
create(byte[] content)
Create a ModuleEntry with new content but other information
copied from this ModuleEntry.
|
static ModuleEntry |
create(String path,
byte[] content)
Create a ModuleEntry for a resource of type
ModuleEntry.Type.CLASS_OR_RESOURCE . |
static ModuleEntry |
create(String path,
Path file)
Create a ModuleEntry for a resource of type
ModuleEntry.Type.CLASS_OR_RESOURCE . |
static ModuleEntry |
create(String path,
ModuleEntry.Type type,
byte[] content)
Create a ModuleEntry for a resource of the given type.
|
static ModuleEntry |
create(String path,
ModuleEntry.Type type,
Path file)
Create a ModuleEntry for a resource of the given type.
|
default ModuleEntry |
create(Path file)
Create a ModuleEntry with new content but other information
copied from this ModuleEntry.
|
default byte[] |
getBytes()
The ModuleEntry content as an array of bytes.
|
long |
getLength()
The ModuleEntry content length.
|
String |
getModule()
The ModuleEntry module name.
|
String |
getPath()
The ModuleEntry path.
|
ModuleEntry.Type |
getType()
The ModuleEntry's type.
|
InputStream |
stream()
The ModuleEntry stream.
|
default void |
write(OutputStream out)
Write the content of this ModuleEntry to stream.
|
String getModule()
String getPath()
ModuleEntry.Type getType()
default byte[] getBytes()
long getLength()
InputStream stream()
default void write(OutputStream out)
out
- the output streamdefault ModuleEntry create(byte[] content)
content
- The new resource content.default ModuleEntry create(Path file)
file
- The new resource content.static ModuleEntry create(String path, ModuleEntry.Type type, byte[] content)
path
- The resource path.type
- The ModuleEntry type.content
- The resource content.static ModuleEntry create(String path, byte[] content)
ModuleEntry.Type.CLASS_OR_RESOURCE
.path
- The resource path.content
- The resource content.static ModuleEntry create(String path, ModuleEntry.Type type, Path file)
path
- The resource path.type
- The ModuleEntry type.file
- The resource file.static ModuleEntry create(String path, Path file)
ModuleEntry.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-ea+126