blob: 83b7dfb56d3f18a93d0a35d0e2a26705de41fce5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import pack.Util;
public class Main {
public static void main(String[] args) throws java.io.IOException {
Util.log(args);
boolean expectResourceCopy = false; // XXXX check
if (expectResourceCopy) {
java.io.InputStream in =
Main.class.getClassLoader().getResourceAsStream("pack/resource.txt");
if (null == in) {
throw new Error("unable to read pack/resource.txt");
}
byte[] buf = new byte[7];
int read = in.read(buf);
String val = new String(buf);
if (!"testing".equals(val)) {
throw new Error("expected \"testing\", got: " + val);
}
}
}
}
|