public class SaveHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FILE_SUFFIX
The default file format and pre-suffix ".zx."
|
| Constructor and Description |
|---|
SaveHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteFile(java.io.File file) |
static void |
saveBytes(byte[] bytes,
java.io.File file)
Saves raw byte data to the given file
|
static void |
saveBytes(byte[] bytes,
java.io.File file,
boolean append)
Saves raw byte data to the given file
|
static void |
saveBytes(byte[] b,
java.io.File destFolder,
java.lang.String fileName,
java.lang.String suffix)
Saves raw byte data to the chosen output folder, but
uses the given file filename + the given suffix
|
static void |
saveImage(java.awt.image.BufferedImage output,
java.io.File destFile)
Write an image directly to the specified file
|
static void |
saveImage(java.awt.image.BufferedImage output,
java.io.File destFolder,
java.lang.String fileName)
Saves the image to a file
|
static void |
saveImage(java.awt.image.BufferedImage output,
java.io.OutputStream os)
Write an image directly to the specified stream without closing the output stream
|
public static final java.lang.String FILE_SUFFIX
public static void saveImage(java.awt.image.BufferedImage output,
java.io.File destFolder,
java.lang.String fileName)
output - destFolder - fileName - public static void saveImage(java.awt.image.BufferedImage output,
java.io.File destFile)
output - destFile - public static void saveImage(java.awt.image.BufferedImage output,
java.io.OutputStream os)
output - os - public static void saveBytes(byte[] bytes,
java.io.File file)
bytes - file - public static void deleteFile(java.io.File file)
public static void saveBytes(byte[] bytes,
java.io.File file,
boolean append)
bytes - file - public static void saveBytes(byte[] b,
java.io.File destFolder,
java.lang.String fileName,
java.lang.String suffix)
b - destFolder - fileName - suffix -