public class NormalizerSerializer extends Object
Normalizer instances.| Constructor and Description |
|---|
NormalizerSerializer() |
| Modifier and Type | Method and Description |
|---|---|
NormalizerSerializer |
addStrategy(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(File file)
Restore a normalizer from the given file
|
<T extends Normalizer> |
restore(InputStream stream)
Restore a normalizer from an input stream
|
<T extends Normalizer> |
restore(String path)
Restore a normalizer from the given path
|
void |
write(Normalizer normalizer,
File file)
Serialize a normalizer to the given file
|
void |
write(Normalizer normalizer,
OutputStream stream)
Serialize a normalizer to an output stream
|
void |
write(Normalizer normalizer,
String path)
Serialize a normalizer to the given file path
|
public void write(@NonNull
Normalizer normalizer,
@NonNull
File file)
throws IOException
normalizer - the normalizerfile - the destination fileIOExceptionpublic void write(@NonNull
Normalizer normalizer,
@NonNull
String path)
throws IOException
normalizer - the normalizerpath - the destination file pathIOExceptionpublic void write(@NonNull
Normalizer normalizer,
@NonNull
OutputStream stream)
throws IOException
normalizer - the normalizerstream - the output stream to write toIOExceptionpublic <T extends Normalizer> T restore(@NonNull String path) throws Exception
path - path of the file containing a serialized normalizerIOExceptionExceptionpublic <T extends Normalizer> T restore(@NonNull File file) throws Exception
file - the file containing a serialized normalizerIOExceptionExceptionpublic <T extends Normalizer> T restore(@NonNull InputStream stream) throws Exception
stream - a stream of serialized normalizer dataIOExceptionExceptionpublic static NormalizerSerializer getDefault()
public NormalizerSerializer addStrategy(@NonNull NormalizerSerializerStrategy strategy)
strategy - the new strategyCopyright © 2018. All rights reserved.