ZipUtil

abstract class ZipUtil

Utility class for handling DOS and Java time conversions.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun adjustToLong(i: Int): Long
Assumes a negative integer really is a positive integer that has wrapped around and re-creates the original value.
Link copied to clipboard
open fun dosToJavaTime(dosTime: Long): Long
Converts DOS time to Java time (number of milliseconds since epoch).
Link copied to clipboard
open fun fromDosTime(zipDosTime: ZipLong): Date
Convert a DOS date/time field to a Date object.
Link copied to clipboard
open fun reverse(array: Array<Byte>): Array<Byte>
Reverses a byte[] array.
Link copied to clipboard
Converts a signed byte into an unsigned integer representation (e.g., -1 becomes 255).
Link copied to clipboard
open fun toDosTime(time: Date): ZipLong
open fun toDosTime(t: Long): Array<Byte>
open fun toDosTime(t: Long, buf: Array<Byte>, offset: Int)
Convert a Date object to a DOS date/time field.
Link copied to clipboard
Converts an unsigned integer to a signed byte (e.g., 255 becomes -1).