T
- the type converted from the file and persisted into the file.public interface FileMarshaller<T>
Modifier and Type | Method and Description |
---|---|
void |
marshal(T newValue,
File output)
Marshals the given newValue into a file.
|
T |
unmarshal(File input)
Unmarshals the given file into an instance of T.
|
void marshal(@Nonnull T newValue, @Nonnull File output) throws IOException
newValue
- the value to marshal into the fileoutput
- the destination fileIOException
- if the file does not exist,
is a directory rather than a regular file,
or for some other reason cannot be opened for
reading.T unmarshal(@Nonnull File input) throws IOException
input
- the file to unmarshalIOException
- if the file does not exist,
is a directory rather than a regular file,
or for some other reason cannot be opened for
reading.Copyright © 2020. All Rights Reserved.