Package tourplaner.business
Class FileHelper
- java.lang.Object
-
- tourplaner.business.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 Filestatic java.awt.image.BufferedImage
getImage(java.io.File file)
Holt ein image von einem Filestatic void
openDefault(java.lang.String f)
Öffnet ein File mit dem Standart Programstatic void
saveImage(java.awt.Image img, java.lang.String type, java.io.File file)
Speichert ein Image
-
-
-
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 Bildtype
- Dateityp z.b. jpgfile
- 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
-
-