Class FileHelper


  • public class FileHelper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      FileHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean delFile​(java.io.File file)
      Löscht ein File
      static java.awt.image.BufferedImage getImage​(java.io.File file)
      Holt ein image von einem File
      static void openDefault​(java.lang.String f)
      Öffnet ein File mit dem Standart Program
      static void saveImage​(java.awt.Image img, java.lang.String type, java.io.File file)
      Speichert ein Image
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileHelper

        public FileHelper()
    • Method Detail

      • openDefault

        public static void openDefault​(java.lang.String f)
        Öffnet ein File mit dem Standart Program
        Parameters:
        f - File Path als string
      • saveImage

        public static void saveImage​(java.awt.Image img,
                                     java.lang.String type,
                                     java.io.File file)
                              throws java.io.IOException
        Speichert ein Image
        Parameters:
        img - Das zu speichernde Bild
        type - Dateityp z.b. jpg
        file - Wo die datei zu speichern ist
        Throws:
        java.io.IOException - Fehler beim speichern des Images
      • getImage

        public static java.awt.image.BufferedImage getImage​(java.io.File file)
                                                     throws java.io.IOException
        Holt ein image von einem File
        Parameters:
        file - File mit dem image
        Returns:
        Das buffered image
        Throws:
        java.io.IOException - Fehler beim öffnen des bildes
      • delFile

        public static boolean delFile​(java.io.File file)
        Löscht ein File
        Parameters:
        file - File das zu löschen ist
        Returns:
        false bei error