4.5.5 -NTFS Extra Field (0x000a):
The following is the layout of the NTFS attributes
"extra" block. (Note: At this time the Mtime, Atime
and Ctime values MAY be used on any WIN32 system.)
Note
all fields stored in Intel low-byte/high-byte order.
Value Size Description
----- ---- -----------
(NTFS) 0x000a 2 bytes Tag for this "extra" block type
TSize 2 bytes Size of the total "extra" block
Reserved 4 bytes Reserved for future use
Tag1 2 bytes NTFS attribute tag value #1
Size1 2 bytes Size of attribute #1, in bytes
(var) Size1 Attribute #1 data
.
.
.
TagN 2 bytes NTFS attribute tag value #N
SizeN 2 bytes Size of attribute #N, in bytes
(var) SizeN Attribute #N data
For NTFS, values for Tag1 through TagN are as follows:
(currently only one set of attributes is defined for NTFS)
Tag Size Description
----- ---- -----------
0x0001 2 bytes Tag for attribute #1
Size1 2 bytes Size of attribute #1, in bytes
Mtime 8 bytes File last modification time
Atime 8 bytes File last access time
Ctime 8 bytes File creation time
| Modifier and Type | Field and Description |
|---|---|
| private ZipEightByteInteger | |
| private ZipEightByteInteger | |
| public static final ZipShort | HEADER_ID
The header ID for this extra field. |
| private ZipEightByteInteger | |
| private static final ZipShort | |
| private static final ZipShort |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static ZipEightByteInteger | |
| public boolean | equals(final Object
the reference object with which to compare. o)Overrides java. |
| private static ZipEightByteInteger | |
| public FileTime | Returns: access time as aFileTime or null.Gets the access time as a |
| public Date | Returns: access time as java.util.Date or null.Gets the access time as a java.util.Date of this ZIP entry, or null if no such timestamp exists in the ZIP entry. |
| public ZipEightByteInteger | Returns: File last access timeGets the "File last access time" of this ZIP entry as a ZipEightByteInteger object, or |
| public byte[] | Returns: the central directory dataImplements org. |
| public ZipShort | Returns: aZipShort for the length of the data of this extra fieldImplements org. |
| public FileTime | Returns: create time as aFileTime or null.Gets the create time as a |
| public Date | Returns: create time as java.util.Date or null.Gets the create time as a java.util.Date of this ZIP entry, or null if no such timestamp exists in the ZIP entry. |
| public ZipEightByteInteger | Returns: File creation timeGets the "File creation time" of this ZIP entry as a ZipEightByteInteger object, or |
| public ZipShort | Returns: the value for the header id for this extrafieldImplements org. |
| public byte[] | Returns: get the dataImplements org. |
| public ZipShort | Returns: aZipShort for the length of the data of this extra fieldImplements org. |
| public FileTime | Returns: modify time as aFileTime or null.Gets the modify time as a |
| public Date | Returns: modify time as java.util.Date or null.Gets the modify time as a java.util.Date of this ZIP entry, or null if no such timestamp exists in the ZIP entry. |
| public ZipEightByteInteger | Returns: File last modification timeGets the "File last modification time" of this ZIP entry as a ZipEightByteInteger object, or |
| public int | |
| public void | parseFromCentralDirectoryData(final byte[]
the buffer to read data from buffer, final int offset into buffer to read data offset, final int the length of data length)Implements org. |
| public void | parseFromLocalFileData(final byte[]
an array of bytes data, int the start offset offset, final int the number of bytes in the array from offset length)Implements org. |
| private void | |
| private void | |
| public void | |
| public void | setAccessJavaTime(final Date
access time as java.util.Date d)Sets the access time as a java.util.Date of this ZIP entry. |
| public void | setAccessTime(final ZipEightByteInteger
ZipEightByteInteger of the access time t)Sets the File last access time of this ZIP entry using a ZipEightByteInteger object. |
| public void | |
| public void | setCreateJavaTime(final Date
create time as java.util.Date d)Sets the create time as a java.util.Date of this ZIP entry. |
| public void | setCreateTime(final ZipEightByteInteger
ZipEightByteInteger of the create time t)Sets the File creation time of this ZIP entry using a ZipEightByteInteger object. |
| public void | |
| public void | setModifyJavaTime(final Date
modify time as java.util.Date d)Sets the modify time as a java.util.Date of this ZIP entry. |
| public void | setModifyTime(final ZipEightByteInteger
ZipEightByteInteger of the modify time t)Sets the File last modification time of this ZIP entry using a ZipEightByteInteger object. |
| public String | Returns: A String representation of this class useful for debugging purposes.Overrides java. |
| private static Date | |
| private static FileTime |
| accessTime | back to summary |
|---|---|
| private ZipEightByteInteger accessTime | |
| createTime | back to summary |
|---|---|
| private ZipEightByteInteger createTime | |
| HEADER_ID | back to summary |
|---|---|
| public static final ZipShort HEADER_ID The header ID for this extra field.
| |
| modifyTime | back to summary |
|---|---|
| private ZipEightByteInteger modifyTime | |
| TIME_ATTR_SIZE | back to summary |
|---|---|
| private static final ZipShort TIME_ATTR_SIZE | |
| TIME_ATTR_TAG | back to summary |
|---|---|
| private static final ZipShort TIME_ATTR_TAG | |
| X000A_NTFS | back to summary |
|---|---|
| public X000A_NTFS() | |
| dateToZip | back to summary |
|---|---|
| private static ZipEightByteInteger dateToZip(final Date d) | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| fileTimeToZip | back to summary |
|---|---|
| private static ZipEightByteInteger fileTimeToZip(final FileTime time) | |
| getAccessFileTime | back to summary |
|---|---|
| public FileTime getAccessFileTime() Gets the access time as a | |
| getAccessJavaTime | back to summary |
|---|---|
| public Date getAccessJavaTime() Gets the access time as a java.util.Date of this ZIP entry, or null if no such timestamp exists in the ZIP entry.
| |
| getAccessTime | back to summary |
|---|---|
| public ZipEightByteInteger getAccessTime() Gets the "File last access time" of this ZIP entry as a ZipEightByteInteger object, or
| |
| getCentralDirectoryData | back to summary |
|---|---|
| public byte[] getCentralDirectoryData() Implements org. Gets the actual data to put into central directory data - without Header-ID or length specifier.
| |
| getCentralDirectoryLength | back to summary |
|---|---|
| public ZipShort getCentralDirectoryLength() Implements org. Gets the length of the extra field in the local file data - without Header-ID or length specifier. For X5455 the central length is often smaller than the local length, because central cannot contain access or create timestamps. | |
| getCreateFileTime | back to summary |
|---|---|
| public FileTime getCreateFileTime() Gets the create time as a | |
| getCreateJavaTime | back to summary |
|---|---|
| public Date getCreateJavaTime() Gets the create time as a java.util.Date of this ZIP entry, or null if no such timestamp exists in the ZIP entry.
| |
| getCreateTime | back to summary |
|---|---|
| public ZipEightByteInteger getCreateTime() Gets the "File creation time" of this ZIP entry as a ZipEightByteInteger object, or
| |
| getHeaderId | back to summary |
|---|---|
| public ZipShort getHeaderId() Implements org. Gets the Header-ID. | |
| getLocalFileDataData | back to summary |
|---|---|
| public byte[] getLocalFileDataData() Implements org. Gets the actual data to put into local file data - without Header-ID or length specifier.
| |
| getLocalFileDataLength | back to summary |
|---|---|
| public ZipShort getLocalFileDataLength() Implements org. Gets the length of the extra field in the local file data - without Header-ID or length specifier. | |
| getModifyFileTime | back to summary |
|---|---|
| public FileTime getModifyFileTime() Gets the modify time as a | |
| getModifyJavaTime | back to summary |
|---|---|
| public Date getModifyJavaTime() Gets the modify time as a java.util.Date of this ZIP entry, or null if no such timestamp exists in the ZIP entry.
| |
| getModifyTime | back to summary |
|---|---|
| public ZipEightByteInteger getModifyTime() Gets the "File last modification time" of this ZIP entry as a ZipEightByteInteger object, or
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| parseFromCentralDirectoryData | back to summary |
|---|---|
| public void parseFromCentralDirectoryData(final byte[] buffer, final int offset, final int length) throws ZipException Implements org. Doesn't do anything special since this class always uses the same parsing logic for both central directory and local file data.
| |
| parseFromLocalFileData | back to summary |
|---|---|
| public void parseFromLocalFileData(final byte[] data, int offset, final int length) throws ZipException Implements org. Populate data from this array as if it was in local file data.
| |
| readTimeAttr | back to summary |
|---|---|
| private void readTimeAttr(final byte[] data, int offset, final int length) | |
| reset | back to summary |
|---|---|
| private void reset() Reset state back to newly constructed state. Helps us make sure parse() calls always generate clean results. | |
| setAccessFileTime | back to summary |
|---|---|
| public void setAccessFileTime(final FileTime time) Sets the access time. | |
| setAccessJavaTime | back to summary |
|---|---|
| public void setAccessJavaTime(final Date d) Sets the access time as a java.util.Date of this ZIP entry.
| |
| setAccessTime | back to summary |
|---|---|
| public void setAccessTime(final ZipEightByteInteger t) Sets the File last access time of this ZIP entry using a ZipEightByteInteger object.
| |
| setCreateFileTime | back to summary |
|---|---|
| public void setCreateFileTime(final FileTime time) Sets the create time. | |
| setCreateJavaTime | back to summary |
|---|---|
| public void setCreateJavaTime(final Date d) Sets the create time as a java.util.Date of this ZIP entry. Supplied value is truncated to per-second precision (milliseconds zeroed-out). Note the setters for flags and timestamps are decoupled. Even if the timestamp is not-null, it will only be written out if the corresponding bit in the flags is also set.
| |
| setCreateTime | back to summary |
|---|---|
| public void setCreateTime(final ZipEightByteInteger t) Sets the File creation time of this ZIP entry using a ZipEightByteInteger object.
| |
| setModifyFileTime | back to summary |
|---|---|
| public void setModifyFileTime(final FileTime time) Sets the modify time. | |
| setModifyJavaTime | back to summary |
|---|---|
| public void setModifyJavaTime(final Date d) Sets the modify time as a java.util.Date of this ZIP entry.
| |
| setModifyTime | back to summary |
|---|---|
| public void setModifyTime(final ZipEightByteInteger t) Sets the File last modification time of this ZIP entry using a ZipEightByteInteger object.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a String representation of this class useful for debugging purposes. | |
| zipToDate | back to summary |
|---|---|
| private static Date zipToDate(final ZipEightByteInteger z) | |
| zipToFileTime | back to summary |
|---|---|
| private static FileTime zipToFileTime(final ZipEightByteInteger z) | |