org.at4j.zip.extattrs
Interface ZipExternalFileAttributesFactory

All Known Implementing Classes:
MsDosExternalFileAttributesFactory, NtfsExternalFileAttributesFactory, UnixExternalFileAttributesFactory

public interface ZipExternalFileAttributesFactory

This interface defines a factory object that is used to create ZipExternalFileAttributes objects for the external file attributes of Zip entries that are created by a specific versions of the Zip software such as "MSDOS" or "Unix".

Since:
1.0
Author:
Karl Gustafsson
See Also:
ZipExternalFileAttributesParserRegistry

Method Summary
 ZipExternalFileAttributes create(UnixEntityType entityType, AbsoluteLocation loc, Object entryToZip)
          Create external file attributes for the entry to Zip.
 ZipVersionMadeBy getVersionMadeBy()
          Get the Zip version that is used to make the kind of external file attributes that are created by this factory.
 

Method Detail

getVersionMadeBy

ZipVersionMadeBy getVersionMadeBy()
Get the Zip version that is used to make the kind of external file attributes that are created by this factory.

Returns:
The version.

create

ZipExternalFileAttributes create(UnixEntityType entityType,
                                 AbsoluteLocation loc,
                                 Object entryToZip)
                                 throws UnsupportedEntityTypeException
Create external file attributes for the entry to Zip.

Parameters:
entityType - The type of the entry (file or directory).
loc - The absolute location of the entry in the Zip archive.
entryToZip - The entry to Zip. This may be a ReadableFile, a DirectoryView, a File (directory) or an InputStream. If the object is ReadLockable (ReadableFile and DirectoryView), it is locked for reading when this method is called. If it is an input stream, this method may not read any data from it.
Returns:
External file attributes for the Zip entry.
Throws:
UnsupportedEntityTypeException - If the entity type is not supported.