Rev 208 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package com.gebauz.Bauzoid.file;
/** File utilities and convenience functions. */
public class FileUtil
{
private FileUtil() {}
/* public static String loadString(FileHandle handle)
{
return handle.readString();
}*/
/** Load a file into a string from assets. */
/* public static String loadStringFromAsset(Resources resources, String asset) throws IOException
{
InputStream is = resources.getAssets().open(asset);
return loadString(is);
}*/
/** Load a file into a string from resources. */
/* public static String loadStringFromResource(Resources resources, int id) throws IOException
{
InputStream is = resources.openRawResource(id);
return loadString(is);
}*/
/* public static String loadString(InputStream is) throws IOException
{
byte[] buffer = new byte[is.available()];
is.read(buffer);
ByteArrayOutputStream os = new ByteArrayOutputStream();
os.write(buffer);
os.close();
is.close();
return os.toString();
}*/
/** Load a file from assets. */
/* public static File loadFileFromAsset(Resources resources, String asset) throws IOException
{
InputStream is = resources.getAssets().open(asset);
return new File(is);
}*/
/** Load a file from resources. */
/* public static File loadFileFromResource(Resources resources, int id) throws IOException
{
InputStream is = resources.openRawResource(id);
return new File(is);
}*/
}