Class ImportUtils


  • public final class ImportUtils
    extends Object
    Author:
    Mathieu Bastian
    • Constructor Detail

      • ImportUtils

        public ImportUtils()
    • Method Detail

      • getTextReader

        public static LineNumberReader getTextReader​(org.openide.filesystems.FileObject fileObject)
                                              throws 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:
        IOException - if the file can't be found or read
      • parseColor

        public static Color parseColor​(String colorString)
      • getTextReader

        public static LineNumberReader getTextReader​(InputStream stream)
                                              throws IOException
        Returns a LineNumberReader for inputStream. 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
      • 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