コード例 #1
0
 public void extractResource(int i, File file)
     throws IOException
 {
     InputStream inputstream = getStream(i);
     Utils.writeOut(inputstream, file);
     inputstream.close();
 }
コード例 #2
0
 public String readFileFromRawRes(int i)
 {
     String s = new String();
     String s1;
     try
     {
         InputStream inputstream = getFileStreamFromRawRes(i);
         ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
         Utils.writeThrough(inputstream, bytearrayoutputstream);
         s1 = new String(bytearrayoutputstream.toByteArray(), "UTF-8");
     }
     catch (Exception exception)
     {
         return s;
     }
     return s1;
 }