public abstract class Pool extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Pool.Module
A module in the pool.
|
static class |
Pool.ModuleData
A ModuleData is the elementary unit of data inside an image.
|
static class |
Pool.ModuleDataType
Type of module data.
|
static interface |
Pool.Visitor
Interface to visit the content of a Pool.
|
Modifier | Constructor and Description |
---|---|
protected |
Pool() |
protected |
Pool(ByteOrder order) |
Modifier and Type | Method and Description |
---|---|
void |
add(Pool.ModuleData data)
Add a ModuleData.
|
boolean |
contains(Pool.ModuleData data)
Check if the pool contains this data.
|
Pool.ModuleData |
get(String path)
Get the ModuleData for the passed path.
|
ByteOrder |
getByteOrder()
The ByteOrder currently in use when generating the jimage file.
|
Collection<Pool.ModuleData> |
getContent()
Get all ModuleData contained in this pool instance.
|
Pool.Module |
getModule(String name)
Retrieves the module for the provided name.
|
Collection<Pool.Module> |
getModules()
The collection of modules contained in this pool.
|
boolean |
isEmpty()
Check if the Pool contains some content.
|
abstract boolean |
isReadOnly()
Read only state.
|
static Pool.ModuleData |
newImageFile(String module,
String path,
Pool.ModuleDataType type,
InputStream content,
long size)
Create a ModuleData for a file that will be located outside a jimage
file.
|
static Pool.ModuleData |
newResource(String path,
byte[] content)
Create a ModuleData for a file that will be located inside a jimage file.
|
static Pool.ModuleData |
newResource(String path,
InputStream content,
long size)
Create a ModuleData located inside a jimage file.
|
void |
visit(Pool.Visitor visitor,
Pool output)
Visit the pool.
|
protected Pool()
protected Pool(ByteOrder order)
public abstract boolean isReadOnly()
public void add(Pool.ModuleData data)
data
- The ModuleData to add.public Pool.Module getModule(String name)
name
- The module namepublic Collection<Pool.Module> getModules()
public Collection<Pool.ModuleData> getContent()
public Pool.ModuleData get(String path)
path
- A data pathpublic boolean contains(Pool.ModuleData data)
data
- The module data to check existence for.public boolean isEmpty()
public void visit(Pool.Visitor visitor, Pool output)
visitor
- The Visitor called for each ModuleData found in the pool.output
- The pool to be filled with Visitor returned ModuleData.public ByteOrder getByteOrder()
public static Pool.ModuleData newResource(String path, InputStream content, long size)
path
- The complete resource path (contains the module radical).content
- The resource content.size
- The content size.public static Pool.ModuleData newResource(String path, byte[] content)
path
- The resource path.content
- The resource content.public static Pool.ModuleData newImageFile(String module, String path, Pool.ModuleDataType type, InputStream content, long size)
module
- The module in which this files is located.path
- The file path locator (doesn't contain the module name).type
- The ModuleData type.content
- The file content.size
- The content size.
Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-04-25-041322.buildd.src