public class NormalizerSerializer extends Object
| Constructor and Description |
|---|
NormalizerSerializer() |
| Modifier and Type | Method and Description |
|---|---|
NormalizerSerializer |
addStrategy(@NonNull NormalizerSerializerStrategy strategy)
Add a normalizer serializer strategy
|
static NormalizerSerializer |
getDefault()
Get the default serializer configured with strategies for the built-in normalizer implementations
|
<T extends Normalizer> |
restore(@NonNull File file)
Restore a normalizer from the given file
|
<T extends Normalizer> |
restore(@NonNull InputStream stream)
Restore a normalizer from an input stream
|
<T extends Normalizer> |
restore(@NonNull String path)
Restore a normalizer from the given path
|
void |
write(@NonNull Normalizer normalizer,
@NonNull File file)
Serialize a normalizer to the given file
|
void |
write(@NonNull Normalizer normalizer,
@NonNull OutputStream stream)
Serialize a normalizer to an output stream
|
void |
write(@NonNull Normalizer normalizer,
@NonNull String path)
Serialize a normalizer to the given file path
|
public void write(@NonNull
@NonNull Normalizer normalizer,
@NonNull
@NonNull File file)
throws IOException
normalizer - the normalizerfile - the destination fileIOExceptionpublic void write(@NonNull
@NonNull Normalizer normalizer,
@NonNull
@NonNull String path)
throws IOException
normalizer - the normalizerpath - the destination file pathIOExceptionpublic void write(@NonNull
@NonNull Normalizer normalizer,
@NonNull
@NonNull OutputStream stream)
throws IOException
normalizer - the normalizerstream - the output stream to write toIOExceptionpublic <T extends Normalizer> T restore(@NonNull @NonNull String path) throws Exception
path - path of the file containing a serialized normalizerIOExceptionExceptionpublic <T extends Normalizer> T restore(@NonNull @NonNull File file) throws Exception
file - the file containing a serialized normalizerIOExceptionExceptionpublic <T extends Normalizer> T restore(@NonNull @NonNull InputStream stream) throws Exception
stream - a stream of serialized normalizer dataIOExceptionExceptionpublic static NormalizerSerializer getDefault()
public NormalizerSerializer addStrategy(@NonNull @NonNull NormalizerSerializerStrategy strategy)
strategy - the new strategyCopyright © 2021. All rights reserved.