1 package com.android.tests.basicjar;
2 
3 import java.io.BufferedReader;
4 import java.io.IOException;
5 import java.io.InputStream;
6 import java.io.InputStreamReader;
7 
8 public class BasicJar {
9 
getContent()10     public static String getContent() {
11         InputStream input = BasicJar.class.getResourceAsStream("/com/android/tests/basicjar/basicJar.txt");
12         if (input == null) {
13             return "FAILED TO FIND basicJar.txt";
14         }
15 
16         BufferedReader reader = null;
17         try {
18             reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
19 
20             return reader.readLine();
21         } catch (IOException e) {
22         } finally {
23             if (reader != null) {
24                 try {
25                     reader.close();
26                 } catch (IOException e) {
27                 }
28             }
29         }
30 
31         return "FAILED TO READ CONTENT";
32     }
33 }