M
- the type of objects implementing classes can deserializepublic interface ModelDeserializer<M>
Modifier and Type | Method and Description |
---|---|
default M |
readModel(byte[] buf)
Convenience method for
readModel(InputStream) , that reads from a given byte array. |
default M |
readModel(File f)
Convenience method for
readModel(InputStream) , that reads from a given File . |
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)
Convenience method for
readModel(InputStream) , that reads from a given URL . |
M readModel(InputStream is) throws IOException
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
readModel(InputStream)
, that reads from a given URL
.IOException
default M readModel(File f) throws IOException
readModel(InputStream)
, that reads from a given File
.IOException
default M readModel(byte[] buf) throws IOException
readModel(InputStream)
, that reads from a given byte array.IOException
Copyright © 2020. All rights reserved.