Package com.mchange.io
Class FileUtils
- java.lang.Object
-
- com.mchange.io.FileUtils
-
public final class FileUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
getBytes(java.io.File file)
static byte[]
getBytes(java.io.File file, int max_len)
static java.lang.String
getContentsAsString(java.io.File file)
static java.lang.String
getContentsAsString(java.io.File file, int max_len)
static java.lang.String
getContentsAsString(java.io.File file, int max_len, java.lang.String enc)
static java.lang.String
getContentsAsString(java.io.File file, java.lang.String enc)
-
-
-
Method Detail
-
getBytes
public static byte[] getBytes(java.io.File file, int max_len) throws java.io.IOException
- Throws:
java.io.IOException
-
getBytes
public static byte[] getBytes(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
getContentsAsString
public static java.lang.String getContentsAsString(java.io.File file, java.lang.String enc) throws java.io.IOException, java.io.UnsupportedEncodingException
- Throws:
java.io.IOException
java.io.UnsupportedEncodingException
-
getContentsAsString
public static java.lang.String getContentsAsString(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
getContentsAsString
public static java.lang.String getContentsAsString(java.io.File file, int max_len, java.lang.String enc) throws java.io.IOException, java.io.UnsupportedEncodingException
- Throws:
java.io.IOException
java.io.UnsupportedEncodingException
-
getContentsAsString
public static java.lang.String getContentsAsString(java.io.File file, int max_len) throws java.io.IOException
- Throws:
java.io.IOException
-
-