Lines Matching defs:extra
27 * @summary Test that client-provided data in the extra field is written and
28 * read correctly, taking into account the JAR_MAGIC written into the extra
40 * Tests that the get/set operations on extra data in zip and jar files work
50 // ZipEntry extra data
51 static final byte[][] extra = new byte[][] {
84 for (byte[] b : extra) {
100 checkEntry(ze, 0, extra[0].length);
103 checkEntry(ze, 1, extra[1].length);
106 /** Test that a header only (i.e., no extra "data") set by client works. */
124 /** Tests the client providing extra data which uses JAR_MAGIC header. */
146 // check if all "expected" extra fields equal to their
147 // corresponding fields in "extra". The "extra" might have
149 static void checkExtra(byte[] expected, byte[] extra) {
158 int len0 = extra.length;
161 int tag0 = get16(extra, off0);
162 int sz0 = get16(extra, off0 + 2);
166 if (expected[off + i] != extra[off0 +i])
174 fail("Expected extra data [tag=" + tag + "sz=" + sz + "] check failed");
180 /** Check that the entry's extra data is correct. */
191 check(Arrays.equals(extra[count], data),
193 + ", expected " + new String(extra[count]) + ", got '" + new String(data) + "'");
244 /** Test extra field of a JAR file. */