@Component(role=ModelReader.class) public class DefaultModelReader extends Object implements ModelReader
INPUT_SOURCE, IS_STRICT
Constructor and Description |
---|
DefaultModelReader() |
Modifier and Type | Method and Description |
---|---|
Model |
read(File input,
Map<String,?> options)
Reads the model from the specified file.
|
Model |
read(InputStream input,
Map<String,?> options)
Reads the model from the specified byte stream.
|
Model |
read(Reader input,
Map<String,?> options)
Reads the model from the specified character reader.
|
public DefaultModelReader()
public Model read(File input, Map<String,?> options) throws IOException
ModelReader
read
in interface ModelReader
input
- 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
.IOException
- If the model could not be deserialized.ModelParseException
- If the input format could not be parsed.public Model read(Reader input, Map<String,?> options) throws IOException
ModelReader
read
in interface ModelReader
input
- 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
.IOException
- If the model could not be deserialized.ModelParseException
- If the input format could not be parsed.public Model read(InputStream input, Map<String,?> options) throws IOException
ModelReader
read
in interface ModelReader
input
- 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
.IOException
- If the model could not be deserialized.ModelParseException
- If the input format could not be parsed.Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.