@Component(role=ModelReader.class) public class DefaultModelReader extends java.lang.Object implements ModelReader
INPUT_SOURCE, IS_STRICT| Constructor and Description |
|---|
DefaultModelReader() |
| Modifier and Type | Method and Description |
|---|---|
private InputSource |
getSource(java.util.Map<java.lang.String,?> options) |
private boolean |
isStrict(java.util.Map<java.lang.String,?> options) |
Model |
read(java.io.File input,
java.util.Map<java.lang.String,?> options)
Reads the model from the specified file.
|
Model |
read(java.io.InputStream input,
java.util.Map<java.lang.String,?> options)
Reads the model from the specified byte stream.
|
private Model |
read(java.io.Reader reader,
boolean strict,
InputSource source) |
Model |
read(java.io.Reader input,
java.util.Map<java.lang.String,?> options)
Reads the model from the specified character reader.
|
public Model read(java.io.File input, java.util.Map<java.lang.String,?> options) throws java.io.IOException
ModelReaderread in interface ModelReaderinput - The file to deserialize the model from, must not be null.options - The options to use for deserialization, may be null to use the default values.null.java.io.IOException - If the model could not be deserialized.ModelParseException - If the input format could not be parsed.public Model read(java.io.Reader input, java.util.Map<java.lang.String,?> options) throws java.io.IOException
ModelReaderread in interface ModelReaderinput - The reader to deserialize the model from, must not be null.options - The options to use for deserialization, may be null to use the default values.null.java.io.IOException - If the model could not be deserialized.ModelParseException - If the input format could not be parsed.public Model read(java.io.InputStream input, java.util.Map<java.lang.String,?> options) throws java.io.IOException
ModelReaderread in interface ModelReaderinput - The stream to deserialize the model from, must not be null.options - The options to use for deserialization, may be null to use the default values.null.java.io.IOException - If the model could not be deserialized.ModelParseException - If the input format could not be parsed.private boolean isStrict(java.util.Map<java.lang.String,?> options)
private InputSource getSource(java.util.Map<java.lang.String,?> options)
private Model read(java.io.Reader reader, boolean strict, InputSource source) throws java.io.IOException
java.io.IOException