You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Main.java 714B

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