Gephi Toolkit Javadoc

org.gephi.io.importer.api
Class ImportUtils

java.lang.Object
  extended by org.gephi.io.importer.api.ImportUtils

public final class ImportUtils
extends java.lang.Object

Author:
Mathieu Bastian

Constructor Summary
ImportUtils()
           
 
Method Summary
static FileObject getArchivedFile(FileObject fileObject)
           
static java.io.LineNumberReader getTextReader(FileObject fileObject)
          Returns a LineNumberReader for fileObject.
static org.w3c.dom.Document getXMLDocument(FileObject fileObject)
           
static org.w3c.dom.Document getXMLDocument(java.io.InputStream stream)
           
static org.w3c.dom.Document getXMLDocument(java.io.Reader reader)
           
static javax.xml.stream.XMLStreamReader getXMLReader(java.io.Reader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportUtils

public ImportUtils()
Method Detail

getTextReader

public static java.io.LineNumberReader getTextReader(FileObject fileObject)
                                              throws java.io.IOException
Returns a LineNumberReader for fileObject. The file must be a text file. The charset is detected automatically.

Parameters:
fileObject - the file object that is to be read
Returns:
a reader for the text file
Throws:
java.io.IOException - if the file can't be found or read

getXMLDocument

public static org.w3c.dom.Document getXMLDocument(java.io.InputStream stream)
                                           throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getXMLDocument

public static org.w3c.dom.Document getXMLDocument(java.io.Reader reader)
                                           throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getXMLDocument

public static org.w3c.dom.Document getXMLDocument(FileObject fileObject)
                                           throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getXMLReader

public static javax.xml.stream.XMLStreamReader getXMLReader(java.io.Reader reader)

getArchivedFile

public static FileObject getArchivedFile(FileObject fileObject)

Gephi Toolkit Javadoc