equal
deleted
inserted
replaced
279 |
279 |
280 /* |
280 /* |
281 * Converts DOS time to Java time (number of milliseconds since epoch). |
281 * Converts DOS time to Java time (number of milliseconds since epoch). |
282 */ |
282 */ |
283 private static long dosToJavaTime(long dtime) { |
283 private static long dosToJavaTime(long dtime) { |
|
284 @SuppressWarnings("deprecation") // Use of date constructor. |
284 Date d = new Date((int)(((dtime >> 25) & 0x7f) + 80), |
285 Date d = new Date((int)(((dtime >> 25) & 0x7f) + 80), |
285 (int)(((dtime >> 21) & 0x0f) - 1), |
286 (int)(((dtime >> 21) & 0x0f) - 1), |
286 (int)((dtime >> 16) & 0x1f), |
287 (int)((dtime >> 16) & 0x1f), |
287 (int)((dtime >> 11) & 0x1f), |
288 (int)((dtime >> 11) & 0x1f), |
288 (int)((dtime >> 5) & 0x3f), |
289 (int)((dtime >> 5) & 0x3f), |
291 } |
292 } |
292 |
293 |
293 /* |
294 /* |
294 * Converts Java time to DOS time. |
295 * Converts Java time to DOS time. |
295 */ |
296 */ |
|
297 @SuppressWarnings("deprecation") // Use of date methods |
296 private static long javaToDosTime(long time) { |
298 private static long javaToDosTime(long time) { |
297 Date d = new Date(time); |
299 Date d = new Date(time); |
298 int year = d.getYear() + 1900; |
300 int year = d.getYear() + 1900; |
299 if (year < 1980) { |
301 if (year < 1980) { |
300 return (1 << 21) | (1 << 16); |
302 return (1 << 21) | (1 << 16); |