Class Zip.ZipContentElement

java.lang.Object
de.hsh.graja.util.Zip.ZipContentElement
Enclosing class:
Zip

public static class Zip.ZipContentElement extends Object
An in-memory representation of a zip file's entry.
  • Constructor Details

    • ZipContentElement

      public ZipContentElement(String path, byte[] bytes, long time)
  • Method Details

    • getPath

      public String getPath()
      Returns:
      the path, where directories end with a trailing '/'. All dir separators are forward slashes.
    • getBytes

      public byte[] getBytes()
      Returns:
      the content as a byte array
    • getSize

      public long getSize()
      Returns:
      the size in bytes
    • getTime

      public long getTime()
      Returns:
      The last modification time of the entry in milliseconds since the epoch
    • isDirectory

      public boolean isDirectory()
      Returns:
      true, if the path ends with '/'
    • setPath

      public void setPath(String path)
      Parameters:
      path - the path, where directories end with a trailing '/'. Backslashes are automatically converted to forward slashes.
    • setBytes

      public void setBytes(byte[] bytes)
      Parameters:
      bytes - the content as a byte array
    • setTime

      public void setTime(long time)
      Parameters:
      time - The last modification time of the entry in milliseconds since the epoch