Subversion Repositories AndroidProjects

Rev

Rev 208 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
208 chris 1
package com.gebauz.Bauzoid.file;
2
 
3
/** File utilities and convenience functions. */
4
public class FileUtil
5
{
6
        private FileUtil() {}
7
 
8
/*      public static String loadString(FileHandle handle)
9
        {
10
                return handle.readString();
11
        }*/
12
 
13
        /** Load a file into a string from assets. */
14
/*      public static String loadStringFromAsset(Resources resources, String asset) throws IOException
15
        {
16
                InputStream is = resources.getAssets().open(asset);
17
 
18
                return loadString(is);
19
        }*/
20
 
21
        /** Load a file into a string from resources. */
22
/*      public static String loadStringFromResource(Resources resources, int id) throws IOException
23
        {
24
                InputStream is = resources.openRawResource(id);
25
 
26
                return loadString(is);
27
        }*/
28
 
29
/*      public static String loadString(InputStream is) throws IOException
30
        {
31
                byte[] buffer = new byte[is.available()];
32
                is.read(buffer);
33
 
34
                ByteArrayOutputStream os = new ByteArrayOutputStream();
35
                os.write(buffer);
36
                os.close();
37
 
38
                is.close();
39
 
40
                return os.toString();
41
        }*/
42
 
43
        /** Load a file from assets. */
44
/*      public static File loadFileFromAsset(Resources resources, String asset) throws IOException
45
        {
46
                InputStream is = resources.getAssets().open(asset);
47
                return new File(is);
48
        }*/
49
 
50
        /** Load a file from resources. */
51
/*      public static File loadFileFromResource(Resources resources, int id) throws IOException
52
        {
53
                InputStream is = resources.openRawResource(id);
54
                return new File(is);
55
        }*/
56
}
57