M - the type of objects implementing classes can deserializepublic interface ModelDeserializer<M>
| Modifier and Type | Method and Description |
|---|---|
default M |
readModel(byte[] buf)
Reads the contents from the given byte buffer and de-serializes it into a model instance.
|
default M |
readModel(File f)
Reads the contents from the given file and de-serializes it into a model instance.
|
M |
readModel(InputStream is)
Reads the contents from the given input stream and de-serializes it into a model instance.
|
default M |
readModel(URL url)
Reads the contents from the given URL and de-serializes it into a model instance.
|
M readModel(InputStream is) throws IOException
Note: the input stream will not be closed.
is - the input stream to read data fromIOException - if an error occurred while reading from the streamFormatException - if the content of the stream was not in the expected formatdefault M readModel(URL url) throws IOException
url - the url to read data fromIOException - if an error occurred while reading from the streamFormatException - if the content of the stream was not in the expected formatdefault M readModel(File f) throws IOException
f - the file to read data fromIOException - if an error occurred while reading from the streamFormatException - if the content of the stream was not in the expected formatdefault M readModel(byte[] buf) throws IOException
buf - the buffer to read data fromIOException - if an error occurred while reading from the streamFormatException - if the content of the stream was not in the expected formatCopyright © 2020. All rights reserved.