public class LayersIndex extends Object
"- "
) and with a colon (":"
) suffix. Layer content is either a file or
directory name written as a quoted string prefixed by space space dash space
(" - "
). A directory name ends with /
, a file name does not. When a
directory name is used it means that all files inside that directory are in the same
layer.
Index files are designed to be compatible with YAML and may be read into a list of
Map<String, List<String>>
instances.
Constructor and Description |
---|
LayersIndex(Iterable<Layer> layers)
Create a new
LayersIndex backed by the given layers. |
LayersIndex(Layer... layers)
Create a new
LayersIndex backed by the given layers. |
Modifier and Type | Method and Description |
---|---|
void |
add(Layer layer,
String name)
Add an item to the index.
|
void |
writeTo(OutputStream out)
Write the layer index to an output stream.
|
public LayersIndex(Layer... layers)
LayersIndex
backed by the given layers.layers
- the layers in the indexpublic LayersIndex(Iterable<Layer> layers)
LayersIndex
backed by the given layers.layers
- the layers in the indexpublic void add(Layer layer, String name)
layer
- the layer of the itemname
- the name of the itempublic void writeTo(OutputStream out) throws IOException
out
- the destination streamIOException
- on IO error