Lines Matching defs:extra

27  * @summary Test ZOS and ZIS timestamp in extra field correctly
61 for (byte[] extra : new byte[][] { null, new byte[] {1, 2, 3}}) {
64 test0(FileTime.from(10, TimeUnit.MILLISECONDS), null, null, null, extra);
66 test0(FileTime.from(-100, TimeUnit.DAYS), null, null, null, extra);
72 tz, extra);
79 tz, extra);
86 tz, extra);
93 tz, extra);
102 TimeZone tz, byte[] extra) throws Throwable {
103 test0(mtime, null, null, null, extra);
104 test0(mtime, null, null, tz, extra); // non-default tz
105 test0(mtime, atime, null, null, extra);
106 test0(mtime, null, ctime, null, extra);
107 test0(mtime, atime, ctime, null, extra);
108 test0(mtime, atime, null, tz, extra);
109 test0(mtime, null, ctime, tz, extra);
110 test0(mtime, atime, ctime, tz, extra);
114 TimeZone tz, byte[] extra) throws Throwable {
124 ze.setExtra(extra);
133 // append an extra entry to help check if the length and data
134 // of the extra field are being correctly written (in previous
136 if (extra != null) {
149 check(mtime, atime, ctime, ze, extra);
181 check(mtime, null, null, ze, extra);
188 ZipEntry ze, byte[] extra) {
206 if (extra != null) {
207 // if extra data exists, the current implementation put it at
208 // the end of the extra data array (implementation detail)
210 if (extra1 == null || extra1.length < extra.length ||
212 extra1.length - extra.length,
214 extra)) {
215 throw new RuntimeException("Timestamp: storing extra field failed!");
271 static void check(ZipEntry ze, byte[] extra) {
272 if (extra != null) {
274 if (extra1 == null || extra1.length < extra.length ||
276 extra1.length - extra.length,
278 extra)) {
279 throw new RuntimeException("Timestamp: storing extra field failed!");
286 byte[] extra = new byte[] { 0x0a, 0, 4, 0, 0, 0, 0, 0 };
289 ze.setExtra(extra);
296 check(ze, extra);
303 check(ze, extra);