public class FileUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(java.io.File source,
java.io.File dest)
Copies the given source File to the given dest File.
|
static void |
readAsset(java.lang.StringBuilder sb,
AssetManager assetManager,
java.lang.String assetName)
Appends the text content of an asset to the given StringBuilder.
|
static byte[] |
readBinaryFile(java.io.File file)
Reads the given File and returns a String.
|
static java.lang.String |
readFile(java.io.File file)
Reads the given File and returns a String.
|
static void |
writeBinaryFile(java.io.File file,
byte[] content)
Writes the given byte[] to the given File.
|
static void |
writeFile(java.io.File file,
java.lang.String content)
Writes the given String to the given File.
|
public static void writeFile(java.io.File file, java.lang.String content) throws java.io.IOException
java.io.IOException
public static void writeBinaryFile(java.io.File file, byte[] content) throws java.io.IOException
java.io.IOException
public static java.lang.String readFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static byte[] readBinaryFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static void copyFile(java.io.File source, java.io.File dest) throws java.io.IOException
java.io.IOException
public static void readAsset(java.lang.StringBuilder sb, AssetManager assetManager, java.lang.String assetName) throws java.io.IOException
java.io.IOException