public class DirectoryChartLoader extends StreamOrientedChartLoader<Path>
StreamOrientedChartLoader<Path>
that creates ChartOuterClass.Chart
instances from filesystem directories represented as Path
objects.toNamedInputStreamEntries(Path)
,
StreamOrientedChartLoader
Constructor and Description |
---|
DirectoryChartLoader()
Creates a new
DirectoryChartLoader . |
DirectoryChartLoader(boolean followSymlinks)
Creates a new
DirectoryChartLoader . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Does nothing on purpose.
|
protected Iterable<? extends Map.Entry<? extends String,? extends InputStream>> |
toNamedInputStreamEntries(Path path)
Converts the supplied
Path , which must be non-null and a
directory, into an Iterable of Map.Entry instances,
each of which consists of an InputStream associated with
a name. |
createTemplateBuilder, installAny, installConfig, installMetadata, load, load
load
public DirectoryChartLoader()
DirectoryChartLoader
.
When loading charts, symbolic links are not followed.
DirectoryChartLoader(boolean)
public DirectoryChartLoader(boolean followSymlinks)
DirectoryChartLoader
.followSymlinks
- if true
, then symbolic links will
be followed during chart loadingprotected Iterable<? extends Map.Entry<? extends String,? extends InputStream>> toNamedInputStreamEntries(Path path) throws IOException
Path
, which must be non-null
and a
directory, into an Iterable
of Map.Entry
instances,
each of which consists of an InputStream
associated with
a name.
This method never returns null
.
Overrides of this method are not permitted to return null
.
toNamedInputStreamEntries
in class StreamOrientedChartLoader<Path>
path
- the Path
to read; must be non-null
and must be a
directory or an effectively empty Iterable
will be
returnednull
Iterable
of Map.Entry
instances representing named InputStream
sIOException
- if there is a problem reading from the
directory represented by the supplied Path
or any of its
subdirectories or filespublic void close() throws IOException
IOException
- if a subclass has overridden this method
and an error occursCopyright © 2017–2018, microBean. All rights reserved.