Class Zip4jUtil

java.lang.Object
net.lingala.zip4j.util.Zip4jUtil

public class Zip4jUtil extends Object
  • Field Details

    • DOSTIME_BEFORE_1980

      private static final long DOSTIME_BEFORE_1980
      See Also:
    • MAX_RAW_READ_FULLY_RETRY_ATTEMPTS

      private static final int MAX_RAW_READ_FULLY_RETRY_ATTEMPTS
      See Also:
  • Constructor Details

    • Zip4jUtil

      public Zip4jUtil()
  • Method Details

    • isStringNullOrEmpty

      public static boolean isStringNullOrEmpty(String str)
    • isStringNotNullAndNotEmpty

      public static boolean isStringNotNullAndNotEmpty(String str)
    • createDirectoryIfNotExists

      public static boolean createDirectoryIfNotExists(File file) throws ZipException
      Throws:
      ZipException
    • epochToExtendedDosTime

      public static long epochToExtendedDosTime(long time)
    • epochToDosTime

      private static long epochToDosTime(long time)
    • dosToExtendedEpochTme

      public static long dosToExtendedEpochTme(long dosTime)
    • dosToEpochTime

      private static long dosToEpochTime(long dosTime)
    • convertCharArrayToByteArray

      public static byte[] convertCharArrayToByteArray(char[] charArray, boolean useUtf8Charset)
    • getCompressionMethod

      public static CompressionMethod getCompressionMethod(AbstractFileHeader localFileHeader) throws ZipException
      Throws:
      ZipException
    • readFully

      public static int readFully(InputStream inputStream, byte[] bufferToReadInto) throws IOException
      Throws:
      IOException
    • readFully

      public static int readFully(InputStream inputStream, byte[] b, int offset, int length) throws IOException
      Throws:
      IOException
    • readUntilBufferIsFull

      private static int readUntilBufferIsFull(InputStream inputStream, byte[] bufferToReadInto, int readLength) throws IOException
      Throws:
      IOException
    • convertCharArrayToByteArrayUsingUtf8

      private static byte[] convertCharArrayToByteArrayUsingUtf8(char[] charArray)
    • convertCharArrayToByteArrayUsingDefaultCharset

      private static byte[] convertCharArrayToByteArrayUsingDefaultCharset(char[] charArray)