40 * Tests that the get/set operations on extra data in zip and jar files work |
40 * Tests that the get/set operations on extra data in zip and jar files work |
41 * as advertised. The base class tests ZIP files, the member class |
41 * as advertised. The base class tests ZIP files, the member class |
42 * TestJarExtra checks JAR files. |
42 * TestJarExtra checks JAR files. |
43 */ |
43 */ |
44 public class TestExtra { |
44 public class TestExtra { |
45 final static int JAR_MAGIC = 0xcafe; // private IN JarOutputStream.java |
45 static final int JAR_MAGIC = 0xcafe; // private IN JarOutputStream.java |
46 final static int TEST_HEADER = 0xbabe; |
46 static final int TEST_HEADER = 0xbabe; |
47 |
47 |
48 final static Charset ascii = Charset.forName("ASCII"); |
48 static final Charset ascii = Charset.forName("ASCII"); |
49 |
49 |
50 // ZipEntry extra data |
50 // ZipEntry extra data |
51 final static byte[][] extra = new byte[][] { |
51 static final byte[][] extra = new byte[][] { |
52 ascii.encode("hello, world").array(), |
52 ascii.encode("hello, world").array(), |
53 ascii.encode("foo bar").array() |
53 ascii.encode("foo bar").array() |
54 }; |
54 }; |
55 |
55 |
56 // For naming entries in JAR/ZIP streams |
56 // For naming entries in JAR/ZIP streams |