public interface IResourceBuilder
Implement this whenever you need to transform a string content into a tuple, map or anything useful according to some decoding strategy.
Watch out : this builder assume resource files are composed of several lines.
Modifier and Type | Interface and Description |
---|---|
static class |
IResourceBuilder.CompactionType
very large resource files are common.
|
Modifier and Type | Method and Description |
---|---|
Tuple |
onEnd()
Callback that tells you the scan is done.
|
void |
onStart()
Callback to tell you you are about to receive new lines.
|
void |
onStream(Reader inputStream)
Callback for you to stream the remote resource file.
|
default void |
prepare(org.thales.punch.settings.api.ISettingsMap settings)
An optional callback to prepare you builder with additional parameters.
|
void onStart()
c
- the compaction mode requested by the caller.void onStream(Reader inputStream) throws IOException
inputStream
- the input stream to consume the resource fileIOException
- in case of IO errorTuple onEnd()
You should typically free any temporary storage, if any, used to build your resource.
default void prepare(org.thales.punch.settings.api.ISettingsMap settings)
settings
- Copyright © 2022. All rights reserved.