Package org.fugerit.java.core.io
Class FileIO
- java.lang.Object
-
- org.fugerit.java.core.io.FileIO
-
public class FileIO extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
createFullFile(File file)
static byte[]
readBytes(File file)
static byte[]
readBytes(String file)
static char[]
readChars(File file)
static char[]
readChars(String file)
static String
readString(File file)
static String
readString(String file)
static StringBuilder
readStringBuffer(File file)
static StringBuilder
readStringBuffer(String file)
static void
recurseDir(File dir, FileFun fun)
static void
recurseDir(File dir, FileFun fun, boolean includeBaseDir)
static void
recurseDirClose(File dir, FileFun fun)
static Result
recurseDirSecure(File dir, FileFun fun)
static void
recurseDirSecure(File dir, FileFun fun, ExHandler handler)
static long
writeBytes(byte[] data, File file)
static long
writeBytes(byte[] data, String file)
static long
writeChars(char[] data, File file)
static long
writeChars(char[] data, String file)
static long
writeString(String data, File file)
static long
writeString(String data, String file)
static long
writeStringBuffer(CharSequence data, File file)
static long
writeStringBuffer(CharSequence data, String file)
static void
zipFile(File file, File dir)
static Result
zipFileSecure(File file, File dir)
static void
zipFileSecure(File file, File dir, ExHandler handler)
-
-
-
Method Detail
-
createFullFile
public static boolean createFullFile(File file) throws IOException
- Throws:
IOException
-
zipFileSecure
public static Result zipFileSecure(File file, File dir) throws IOException
- Throws:
IOException
-
zipFileSecure
public static void zipFileSecure(File file, File dir, ExHandler handler) throws IOException
- Throws:
IOException
-
zipFile
public static void zipFile(File file, File dir) throws IOException
- Throws:
IOException
-
recurseDirSecure
public static Result recurseDirSecure(File dir, FileFun fun) throws IOException
- Throws:
IOException
-
recurseDirSecure
public static void recurseDirSecure(File dir, FileFun fun, ExHandler handler) throws IOException
- Throws:
IOException
-
recurseDir
public static void recurseDir(File dir, FileFun fun) throws IOException
- Throws:
IOException
-
recurseDir
public static void recurseDir(File dir, FileFun fun, boolean includeBaseDir) throws IOException
- Throws:
IOException
-
recurseDirClose
public static void recurseDirClose(File dir, FileFun fun) throws IOException
- Throws:
IOException
-
readStringBuffer
public static StringBuilder readStringBuffer(String file) throws IOException
- Throws:
IOException
-
readString
public static String readString(String file) throws IOException
- Throws:
IOException
-
readBytes
public static byte[] readBytes(String file) throws IOException
- Throws:
IOException
-
readChars
public static char[] readChars(String file) throws IOException
- Throws:
IOException
-
readStringBuffer
public static StringBuilder readStringBuffer(File file) throws IOException
- Throws:
IOException
-
readString
public static String readString(File file) throws IOException
- Throws:
IOException
-
readBytes
public static byte[] readBytes(File file) throws IOException
- Throws:
IOException
-
readChars
public static char[] readChars(File file) throws IOException
- Throws:
IOException
-
writeStringBuffer
public static long writeStringBuffer(CharSequence data, String file) throws IOException
- Throws:
IOException
-
writeString
public static long writeString(String data, String file) throws IOException
- Throws:
IOException
-
writeBytes
public static long writeBytes(byte[] data, String file) throws IOException
- Throws:
IOException
-
writeChars
public static long writeChars(char[] data, String file) throws IOException
- Throws:
IOException
-
writeStringBuffer
public static long writeStringBuffer(CharSequence data, File file) throws IOException
- Throws:
IOException
-
writeString
public static long writeString(String data, File file) throws IOException
- Throws:
IOException
-
writeBytes
public static long writeBytes(byte[] data, File file) throws IOException
- Throws:
IOException
-
writeChars
public static long writeChars(char[] data, File file) throws IOException
- Throws:
IOException
-
-