Created
January 6, 2016 21:00
-
-
Save giraldeau/b0f32ae1ab31a0a23ff3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void readBundleResource() throws IOException { | |
Bundle bundle = CTestPlugin.getDefault().getBundle(); | |
URL entry = bundle.getEntry("resources/elf/build.log"); | |
URL resource = bundle.getResource("resources/elf/build.log"); | |
System.out.println(entry); | |
System.out.println(resource); | |
try (InputStream s1 = entry.openStream()) { | |
BufferedReader reader = new BufferedReader(new InputStreamReader(s1)); | |
System.out.println("build first line:" + reader.readLine()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment