diff options
Diffstat (limited to 'testapps/basicJar3/src/com/android/tests/basicjar3/BasicJar3.java')
-rw-r--r-- | testapps/basicJar3/src/com/android/tests/basicjar3/BasicJar3.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testapps/basicJar3/src/com/android/tests/basicjar3/BasicJar3.java b/testapps/basicJar3/src/com/android/tests/basicjar3/BasicJar3.java new file mode 100644 index 0000000..60d021d --- /dev/null +++ b/testapps/basicJar3/src/com/android/tests/basicjar3/BasicJar3.java @@ -0,0 +1,33 @@ +package com.android.tests.basicjar3; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +public class BasicJar3 { + + public static String getContent() { + InputStream input = BasicJar3.class.getResourceAsStream("basicJar3.txt"); + if (input == null) { + return "FAILED TO FIND basicJar3.txt"; + } + + BufferedReader reader = null; + try { + reader = new BufferedReader(new InputStreamReader(input, "UTF-8")); + + return reader.readLine(); + } catch (IOException e) { + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException e) { + } + } + } + + return "FAILED TO READ CONTENT"; + } +}
\ No newline at end of file |