org.nuiton.jredmine.model.io.xpp3
Class RedmineXpp3Helper

java.lang.Object
  extended by org.nuiton.jredmine.model.io.xpp3.RedmineXpp3Helper

public class RedmineXpp3Helper
extends Object

Pour construire le modèle à partir de fichiers xml contenant les données.

Since:
1.0.0
Author:
tchemit

Constructor Summary
RedmineXpp3Helper()
           
 
Method Summary
<O> O
readObject(Class<O> klass, File file, boolean strict)
           
<O> O
readObject(Class<O> klass, InputStream stream, boolean strict)
           
<O> O
readObject(Class<O> klass, Reader reader, boolean strict)
          Read a single object from a xml stream.
<O> O
readObject(Class<O> klass, String txt, boolean strict)
           
<O> O[]
readObjects(Class<O> klass, File file, boolean strict)
           
<O> O[]
readObjects(Class<O> klass, InputStream stream, boolean strict)
           
<O> O[]
readObjects(Class<O> klass, Reader reader, boolean strict)
          Read an array of objects from a xml stream.
<O> O[]
readObjects(Class<O> klass, String txt, boolean strict)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedmineXpp3Helper

public RedmineXpp3Helper()
Method Detail

readObject

public <O> O readObject(Class<O> klass,
                        String txt,
                        boolean strict)
             throws IOException,
                    org.codehaus.plexus.util.xml.pull.XmlPullParserException
Throws:
IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

readObjects

public <O> O[] readObjects(Class<O> klass,
                           String txt,
                           boolean strict)
                throws IOException,
                       org.codehaus.plexus.util.xml.pull.XmlPullParserException
Throws:
IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

readObject

public <O> O readObject(Class<O> klass,
                        File file,
                        boolean strict)
             throws IOException,
                    org.codehaus.plexus.util.xml.pull.XmlPullParserException
Throws:
IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

readObjects

public <O> O[] readObjects(Class<O> klass,
                           File file,
                           boolean strict)
                throws IOException,
                       org.codehaus.plexus.util.xml.pull.XmlPullParserException
Throws:
IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

readObject

public <O> O readObject(Class<O> klass,
                        InputStream stream,
                        boolean strict)
             throws IOException,
                    org.codehaus.plexus.util.xml.pull.XmlPullParserException
Throws:
IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

readObjects

public <O> O[] readObjects(Class<O> klass,
                           InputStream stream,
                           boolean strict)
                throws IOException,
                       org.codehaus.plexus.util.xml.pull.XmlPullParserException
Throws:
IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserException

readObjects

public <O> O[] readObjects(Class<O> klass,
                           Reader reader,
                           boolean strict)
                throws IOException,
                       org.codehaus.plexus.util.xml.pull.XmlPullParserException
Read an array of objects from a xml stream.

Type Parameters:
O - the type of objects to return
Parameters:
klass - the type of object to read
reader - the reader where to parse the xml
strict - a flag to have a strict reading of input source
Returns:
the loaded objects
Throws:
IOException - if any io pb
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pb

readObject

public <O> O readObject(Class<O> klass,
                        Reader reader,
                        boolean strict)
             throws IOException,
                    org.codehaus.plexus.util.xml.pull.XmlPullParserException
Read a single object from a xml stream.

Type Parameters:
O - the type of object to read
Parameters:
klass - the type of object to read
reader - the reader where to parse the xml
strict - a flag to have a strict reading of input source
Returns:
the loaded object
Throws:
IOException - if any io pb
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if any parsing pb


Copyright © 2009-2012 CodeLutin. All Rights Reserved.