diff options
author | Xavier Ducrohet <xav@android.com> | 2012-03-07 15:20:12 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-03-07 15:46:38 -0800 |
commit | 8a3082c6750064eaab3e0a63816f136bb061b6c6 (patch) | |
tree | 6234eece3b136b3d7874bec97e160617ec742dc1 /testapps/basicJar2/src/com/android | |
parent | bcf44e9429811b3e1f97d21ea92816957bce2601 (diff) | |
download | sdk-8a3082c6750064eaab3e0a63816f136bb061b6c6.zip sdk-8a3082c6750064eaab3e0a63816f136bb061b6c6.tar.gz sdk-8a3082c6750064eaab3e0a63816f136bb061b6c6.tar.bz2 |
More changes to the test projects.
Change-Id: I823bcc19b7de6cea4c985f2c01feccddd6f8022d
Diffstat (limited to 'testapps/basicJar2/src/com/android')
-rw-r--r-- | testapps/basicJar2/src/com/android/tests/basicjar2/BasicJar2.java | 33 | ||||
-rw-r--r-- | testapps/basicJar2/src/com/android/tests/basicjar2/basicJar2.txt | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/testapps/basicJar2/src/com/android/tests/basicjar2/BasicJar2.java b/testapps/basicJar2/src/com/android/tests/basicjar2/BasicJar2.java new file mode 100644 index 0000000..dec3eae --- /dev/null +++ b/testapps/basicJar2/src/com/android/tests/basicjar2/BasicJar2.java @@ -0,0 +1,33 @@ +package com.android.tests.basicjar2; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +public class BasicJar2 { + + public static String getContent() { + InputStream input = BasicJar2.class.getResourceAsStream("basicJar2.txt"); + if (input == null) { + return "FAILED TO FIND basicJar2.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 diff --git a/testapps/basicJar2/src/com/android/tests/basicjar2/basicJar2.txt b/testapps/basicJar2/src/com/android/tests/basicjar2/basicJar2.txt new file mode 100644 index 0000000..c08eda2 --- /dev/null +++ b/testapps/basicJar2/src/com/android/tests/basicjar2/basicJar2.txt @@ -0,0 +1 @@ +SUCCESS from basicJar2.jar
\ No newline at end of file |