org.apache.maven.model.io
Class DefaultModelReader
java.lang.Object
org.apache.maven.model.io.DefaultModelReader
- All Implemented Interfaces:
- ModelReader
@Component(role=ModelReader.class)
public class DefaultModelReader
- extends java.lang.Object
- implements ModelReader
Handles deserialization of a model from some kind of textual format like XML.
- Author:
- Benjamin Bentmann
|
Method Summary |
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. |
Model |
read(java.io.Reader input,
java.util.Map<java.lang.String,?> options)
Reads the model from the specified character reader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultModelReader
public DefaultModelReader()
read
public Model read(java.io.File input,
java.util.Map<java.lang.String,?> options)
throws java.io.IOException
- Description copied from interface:
ModelReader
- Reads the model from the specified file.
- Specified by:
read in interface ModelReader
- Parameters:
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.
- Returns:
- The deserialized model, never
null.
- Throws:
java.io.IOException - If the model could not be deserialized.
ModelParseException - If the input format could not be parsed.
read
public Model read(java.io.Reader input,
java.util.Map<java.lang.String,?> options)
throws java.io.IOException
- Description copied from interface:
ModelReader
- Reads the model from the specified character reader. The reader will be automatically closed before the method
returns.
- Specified by:
read in interface ModelReader
- Parameters:
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.
- Returns:
- The deserialized model, never
null.
- Throws:
java.io.IOException - If the model could not be deserialized.
ModelParseException - If the input format could not be parsed.
read
public Model read(java.io.InputStream input,
java.util.Map<java.lang.String,?> options)
throws java.io.IOException
- Description copied from interface:
ModelReader
- Reads the model from the specified byte stream. The stream will be automatically closed before the method
returns.
- Specified by:
read in interface ModelReader
- Parameters:
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.
- Returns:
- The deserialized model, never
null.
- Throws:
java.io.IOException - If the model could not be deserialized.
ModelParseException - If the input format could not be parsed.
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.