public class X000A_NTFS extends Object implements ZipExtraField
    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
 EXTRAFIELD_HEADER_SIZE| Constructor and Description | 
|---|
| X000A_NTFS() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o) | 
| Date | getAccessJavaTime()Returns the access time as a java.util.Date
 of this zip entry, or null if no such timestamp exists in the zip entry. | 
| ZipEightByteInteger | getAccessTime()Returns the "File last access time" of this zip entry as a
 ZipEightByteInteger object, or  ZipEightByteInteger.ZEROif no such timestamp exists in the zip entry. | 
| byte[] | getCentralDirectoryData()The actual data to put into central directory data - without Header-ID
 or length specifier. | 
| ZipShort | getCentralDirectoryLength()Length of the extra field in the local file data - without
 Header-ID or length specifier. | 
| Date | getCreateJavaTime()Returns the create time as a a java.util.Date of this zip
 entry, or null if no such timestamp exists in the zip entry. | 
| ZipEightByteInteger | getCreateTime()Returns the "File creation time" of this zip entry as a
 ZipEightByteInteger object, or  ZipEightByteInteger.ZEROif no such timestamp exists in the zip entry. | 
| 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. | 
| Date | getModifyJavaTime()Returns the modify time as a java.util.Date
 of this zip entry, or null if no such timestamp exists in the zip entry. | 
| ZipEightByteInteger | getModifyTime()Returns the "File last modification time" of this zip entry as
 a ZipEightByteInteger object, or  ZipEightByteInteger.ZEROif no such timestamp exists in the
 zip entry. | 
| int | hashCode() | 
| void | parseFromCentralDirectoryData(byte[] buffer,
                             int offset,
                             int length)Doesn't do anything special since this class always uses the
 same parsing logic for both central directory and local file data. | 
| void | parseFromLocalFileData(byte[] data,
                      int offset,
                      int length)Populate data from this array as if it was in local file data. | 
| void | setAccessJavaTime(Date d)Sets the access time as a java.util.Date
 of this zip entry. | 
| void | setAccessTime(ZipEightByteInteger t)Sets the File last access time of this zip entry using a
 ZipEightByteInteger object. | 
| void | setCreateJavaTime(Date d)
 Sets the create time as a java.util.Date
 of this zip entry. | 
| void | setCreateTime(ZipEightByteInteger t)Sets the File creation time of this zip entry using a
 ZipEightByteInteger object. | 
| void | setModifyJavaTime(Date d)Sets the modify time as a java.util.Date of this zip entry. | 
| void | setModifyTime(ZipEightByteInteger t)Sets the File last modification time of this zip entry using a
 ZipEightByteInteger object. | 
| String | toString()Returns a String representation of this class useful for
 debugging purposes. | 
public X000A_NTFS()
public ZipShort getHeaderId()
getHeaderId in interface ZipExtraFieldpublic ZipShort getLocalFileDataLength()
getLocalFileDataLength in interface ZipExtraFieldZipShort for the length of the data of this extra fieldpublic ZipShort getCentralDirectoryLength()
For X5455 the central length is often smaller than the local length, because central cannot contain access or create timestamps.
getCentralDirectoryLength in interface ZipExtraFieldZipShort for the length of the data of this extra fieldpublic byte[] getLocalFileDataData()
getLocalFileDataData in interface ZipExtraFieldpublic byte[] getCentralDirectoryData()
getCentralDirectoryData in interface ZipExtraFieldpublic void parseFromLocalFileData(byte[] data, int offset, int length) throws ZipException
parseFromLocalFileData in interface ZipExtraFielddata - an array of bytesoffset - the start offsetlength - the number of bytes in the array from offsetZipException - on errorpublic void parseFromCentralDirectoryData(byte[] buffer, int offset, int length) throws ZipException
parseFromCentralDirectoryData in interface ZipExtraFieldbuffer - the buffer to read data fromoffset - offset into buffer to read datalength - the length of dataZipException - on errorpublic ZipEightByteInteger getModifyTime()
ZipEightByteInteger.ZERO if no such timestamp exists in the
 zip entry.public ZipEightByteInteger getAccessTime()
ZipEightByteInteger.ZERO
 if no such timestamp exists in the zip entry.public ZipEightByteInteger getCreateTime()
ZipEightByteInteger.ZERO
 if no such timestamp exists in the zip entry.public Date getModifyJavaTime()
public Date getAccessJavaTime()
public Date getCreateJavaTime()
public void setModifyTime(ZipEightByteInteger t)
t - ZipEightByteInteger of the modify timepublic void setAccessTime(ZipEightByteInteger t)
t - ZipEightByteInteger of the access timepublic void setCreateTime(ZipEightByteInteger t)
t - ZipEightByteInteger of the create timepublic void setModifyJavaTime(Date d)
d - modify time as java.util.Datepublic void setAccessJavaTime(Date d)
d - access time as java.util.Datepublic void setCreateJavaTime(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.
d - create time as java.util.Datepublic String toString()
Copyright © 2018 The Apache Software Foundation. All rights reserved.