org.entityfs.zip.cap.entity
Interface ECZipEntry

All Superinterfaces:
EntityCapability
All Known Subinterfaces:
ECJarEntry
All Known Implementing Classes:
ECZipEntryImpl

public interface ECZipEntry
extends EntityCapability

This is an entity capability for entities that have ZipEntry objects. All entities in a Zip or Jar file system support this.

This capability interface does not redefine all ZipEntry methods. Some of the methods are not redefined since Zip file systems are read only, other methods are not defined because they can be mapped to ordinary entity method. ZipEntry.getTime() maps to EntityView.getLastModified(), for instance.

Since:
1.0
Author:
Karl Gustafsson
See Also:
ECTZipEntry, ECZipEntryUtil, FSCZipFileBacked

Method Summary
 String getComment()
          Get the entity's comment.
 long getCompressedSize()
          Get the compressed size of the entity.
 long getCrc()
          Get the CRC checksum for the entity.
 byte[] getExtra()
          Get extra information for the entity.
 
Methods inherited from interface org.entityfs.cap.EntityCapability
getEntity, isValid
 

Method Detail

getExtra

byte[] getExtra()
                throws ReadLockRequiredException,
                       AccessDeniedException
Get extra information for the entity.

Returns:
The Zip entry extra data or null if none.
Throws:
ReadLockRequiredException - If the client does not have a read lock for the file.
AccessDeniedException - If the client does not have read access to the entity.
See Also:
ZipEntry.getExtra()
Locks_required:
A read lock on the entity.
Permissions_required:
Read access to the entity.

getCrc

long getCrc()
            throws ReadLockRequiredException,
                   AccessDeniedException
Get the CRC checksum for the entity.

Returns:
The Zip entry CRC-32 checksum, or -1 if not known.
Throws:
ReadLockRequiredException - If the client does not have a read lock for the file.
AccessDeniedException - If the client does not have read access to the entity.
See Also:
ZipEntry.getCrc()
Locks_required:
A read lock on the entity.
Permissions_required:
Read access.

getCompressedSize

long getCompressedSize()
                       throws ReadLockRequiredException,
                              AccessDeniedException
Get the compressed size of the entity.

Returns:
The compressed size of the Zip entry, or -1 if not known.
Throws:
ReadLockRequiredException - If the client does not have a read lock for the file.
AccessDeniedException - If the client does not have read access to the entity.
See Also:
ZipEntry.getCompressedSize()
Locks_required:
A read lock on the entity.
Permissions_required:
Read access.

getComment

String getComment()
                  throws ReadLockRequiredException,
                         AccessDeniedException
Get the entity's comment.

Returns:
The Zip entry comment, or null if none.
Throws:
ReadLockRequiredException - If the client does not have a read lock for the file.
AccessDeniedException - If the client does not have read access to the entity.
See Also:
ZipEntry.getComment()
Locks_required:
A read lock on the entity.
Permissions_required:
Read access.