Package org.gephi.io.importer.api
Class ImportUtils
- java.lang.Object
-
- org.gephi.io.importer.api.ImportUtils
-
public final class ImportUtils extends Object
- Author:
- Mathieu Bastian
-
-
Constructor Summary
Constructors Constructor Description ImportUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.openide.filesystems.FileObjectgetArchivedFile(org.openide.filesystems.FileObject fileObject)static FilegetBzipFile(org.openide.filesystems.FileObject in, File out, boolean isTar)static FilegetGzFile(org.openide.filesystems.FileObject in, File out, boolean isTar)static LineNumberReadergetTextReader(InputStream stream)Returns aLineNumberReaderforinputStream.static LineNumberReadergetTextReader(Reader reader)static LineNumberReadergetTextReader(org.openide.filesystems.FileObject fileObject)Returns aLineNumberReaderforfileObject.static DocumentgetXMLDocument(InputStream stream)static DocumentgetXMLDocument(Reader reader)static DocumentgetXMLDocument(org.openide.filesystems.FileObject fileObject)static XMLStreamReadergetXMLReader(Reader reader)static booleanisArchiveFile(org.openide.filesystems.FileObject fileObject)static ColorparseColor(String colorString)
-
-
-
Method Detail
-
getTextReader
public static LineNumberReader getTextReader(org.openide.filesystems.FileObject fileObject) throws IOException
Returns aLineNumberReaderforfileObject. 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:
IOException- if the file can't be found or read
-
getTextReader
public static LineNumberReader getTextReader(InputStream stream) throws IOException
Returns aLineNumberReaderforinputStream. The stream must be a character stream. The charset is detected automatically.- Parameters:
stream- the stream that is to be read- Returns:
- a reader for the character stream
- Throws:
IOException- if the stream can't be read
-
getTextReader
public static LineNumberReader getTextReader(Reader reader)
-
getXMLDocument
public static Document getXMLDocument(InputStream stream) throws RuntimeException
- Throws:
RuntimeException
-
getXMLDocument
public static Document getXMLDocument(Reader reader) throws RuntimeException
- Throws:
RuntimeException
-
getXMLDocument
public static Document getXMLDocument(org.openide.filesystems.FileObject fileObject) throws RuntimeException
- Throws:
RuntimeException
-
getXMLReader
public static XMLStreamReader getXMLReader(Reader reader)
-
isArchiveFile
public static boolean isArchiveFile(org.openide.filesystems.FileObject fileObject)
-
getArchivedFile
public static org.openide.filesystems.FileObject getArchivedFile(org.openide.filesystems.FileObject fileObject)
-
getBzipFile
public static File getBzipFile(org.openide.filesystems.FileObject in, File out, boolean isTar) throws IOException
- Throws:
IOException
-
getGzFile
public static File getGzFile(org.openide.filesystems.FileObject in, File out, boolean isTar) throws IOException
- Throws:
IOException
-
-