com.mucommander.file.impl.zip.provider
Interface ZipExtraField

All Known Implementing Classes:
AsiExtraField, JarMarker, UnrecognizedExtraField

public interface ZipExtraField

General format of extra field data.

Extra fields usually appear twice per file, once in the local file data and once in the central directory. Usually they are the same, but they don't have to be. java.util.zip.ZipOutputStream will only use the local file data in both places.

--------------------------------------------------------------------------------------------------------------

This class is based off the org.apache.tools.zip package of the Apache Ant project. The Ant code has been modified under the terms of the Apache License which you can find in the bundled muCommander license file. It was forked at version 1.7.0 of Ant.

Author:
Apache Ant, Maxence Bernard

Method Summary
 byte[] getCentralDirectoryData()
          The actual data to put central directory - without Header-ID or length specifier.
 ZipShort getCentralDirectoryLength()
          Length of the extra field in the central directory - without Header-ID or length specifier.
 ZipShort getHeaderId()
          The Header-ID.
 byte[] getLocalFileDataData()
          The actual data to put into local file data - without Header-ID or length specifier.
 ZipShort getLocalFileDataLength()
          Length of the extra field in the local file data - without Header-ID or length specifier.
 void parseFromLocalFileData(byte[] data, int offset, int length)
          Populate data from this array as if it was in local file data.
 

Method Detail

getHeaderId

ZipShort getHeaderId()
The Header-ID.

Returns:
the header id

getLocalFileDataLength

ZipShort getLocalFileDataLength()
Length of the extra field in the local file data - without Header-ID or length specifier.

Returns:
the length of the field in the local file data

getCentralDirectoryLength

ZipShort getCentralDirectoryLength()
Length of the extra field in the central directory - without Header-ID or length specifier.

Returns:
the length of the field in the central directory

getLocalFileDataData

byte[] getLocalFileDataData()
The actual data to put into local file data - without Header-ID or length specifier.

Returns:
the data

getCentralDirectoryData

byte[] getCentralDirectoryData()
The actual data to put central directory - without Header-ID or length specifier.

Returns:
the data

parseFromLocalFileData

void parseFromLocalFileData(byte[] data,
                            int offset,
                            int length)
                            throws java.util.zip.ZipException
Populate data from this array as if it was in local file data.

Parameters:
data - an array of bytes
offset - the start offset
length - the number of bytes in the array from offset
Throws:
java.util.zip.ZipException - on error


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard