public class SevenZArchiveEntry extends Objectimplements ArchiveEntry
SIZE_UNKNOWN| Constructor and Description |
|---|
SevenZArchiveEntry()
|
| Modifier and Type | Method and Description |
|---|---|
Date |
getAccessDate()
Gets the access date.
|
Iterable |
getContentMethods()
Gets the (compression) methods to use for entry's content - the default is LZMA2.
|
int |
getCrc()
Deprecated.
use getCrcValue instead.
|
long |
getCrcValue()
Gets the CRC.
|
Date |
getCreationDate()
Gets the creation date.
|
boolean |
getHasAccessDate()
Returns whether this entry has got an access date at all.
|
boolean |
getHasCrc()
Returns whether this entry has got a crc.
|
boolean |
getHasCreationDate()
Returns whether this entry has got a creation date at all.
|
boolean |
getHasLastModifiedDate()
Returns whether this entry has got a last modified date at all.
|
boolean |
getHasWindowsAttributes()
Returns whether this entry has windows attributes.
|
Date |
getLastModifiedDate()
Gets the last modified date.
|
String |
getName()
Get this entry's name.
|
long |
getSize()
Get this entry's file size.
|
int |
getWindowsAttributes()
Gets the windows attributes.
|
boolean |
hasStream()
Whether there is any content associated with this entry.
|
boolean |
isAntiItem()
Indicates whether this is an "anti-item" used in differential backups, meaning it should delete the same file from a previous backup.
|
boolean |
isDirectory()
Return whether or not this entry represents a directory.
|
static long |
javaTimeToNtfsTime(Date
Converts Java time to NTFS time.
|
static Date |
ntfsTimeToJavaTime(long ntfsTime)
Converts NTFS time (100 nanosecond units since 1 January 1601) to Java time.
|
void |
setAccessDate(Date
Sets the access date,
|
void |
setAccessDate(long ntfsAccessDate)
Sets the access date using NTFS time (100 nanosecond units since 1 January 1601)
|
void |
setAntiItem(boolean isAntiItem)
Sets whether this is an "anti-item" used in differential backups, meaning it should delete the same file from a previous backup.
|
void |
setContentMethods(Iterable
Sets the (compression) methods to use for entry's content - the default is LZMA2.
|
void |
setCrc(int crc)
Deprecated.
use setCrcValue instead.
|
void |
setCrcValue(long crc)
Sets the CRC.
|
void |
setCreationDate(Date
Sets the creation date,
|
void |
setCreationDate(long ntfsCreationDate)
Sets the creation date using NTFS time (100 nanosecond units since 1 January 1601)
|
void |
setDirectory(boolean isDirectory)
Sets whether or not this entry represents a directory.
|
void |
setHasAccessDate(boolean hasAcessDate)
Sets whether this entry has got an access date at all.
|
void |
setHasCrc(boolean hasCrc)
Sets whether this entry has got a crc.
|
void |
setHasCreationDate(boolean hasCreationDate)
Sets whether this entry has got a creation date at all.
|
void |
setHasLastModifiedDate(boolean hasLastModifiedDate)
Sets whether this entry has got a last modified date at all.
|
void |
setHasStream(boolean hasStream)
Sets whether there is any content associated with this entry.
|
void |
setHasWindowsAttributes(boolean hasWindowsAttributes)
Sets whether this entry has windows attributes.
|
void |
setLastModifiedDate(Date
Sets the last modified date,
|
void |
setLastModifiedDate(long ntfsLastModifiedDate)
Sets the last modified date using NTFS time (100 nanosecond units since 1 January 1601)
|
void |
setName(String
Set this entry's name.
|
void |
setSize(long size)
Set this entry's file size.
|
void |
setWindowsAttributes(int windowsAttributes)
Sets the windows attributes.
|
public StringgetName()
getName in interface
ArchiveEntry
public void setName(Stringname)
name - This entry's new name.
public boolean hasStream()
public void setHasStream(boolean hasStream)
hasStream - whether there is any content associated with this entry.
public boolean isDirectory()
isDirectory in interface
ArchiveEntry
public void setDirectory(boolean isDirectory)
isDirectory - True if this entry is a directory.
public boolean isAntiItem()
public void setAntiItem(boolean isAntiItem)
isAntiItem - true if it is an ait-item, false otherwise
public boolean getHasCreationDate()
public void setHasCreationDate(boolean hasCreationDate)
public DategetCreationDate()
UnsupportedOperationException - if the entry hasn't got a creation date.
public void setCreationDate(long ntfsCreationDate)
public void setCreationDate(DatecreationDate)
public boolean getHasLastModifiedDate()
public void setHasLastModifiedDate(boolean hasLastModifiedDate)
public DategetLastModifiedDate()
getLastModifiedDate in interface
ArchiveEntry
UnsupportedOperationException - if the entry hasn't got a last modified date.
public void setLastModifiedDate(long ntfsLastModifiedDate)
public void setLastModifiedDate(DatelastModifiedDate)
public boolean getHasAccessDate()
public void setHasAccessDate(boolean hasAcessDate)
public DategetAccessDate()
UnsupportedOperationException - if the entry hasn't got a access date.
public void setAccessDate(long ntfsAccessDate)
public void setAccessDate(DateaccessDate)
public boolean getHasWindowsAttributes()
public void setHasWindowsAttributes(boolean hasWindowsAttributes)
public int getWindowsAttributes()
public void setWindowsAttributes(int windowsAttributes)
public boolean getHasCrc()
public void setHasCrc(boolean hasCrc)
@Deprecated public int getCrc()
@Deprecated public void setCrc(int crc)
public long getCrcValue()
public void setCrcValue(long crc)
public long getSize()
getSize in interface
ArchiveEntry
public void setSize(long size)
size - This entry's new file size.
public void setContentMethods(Iterable<? extends SevenZMethodConfiguration > methods)
Currently only SevenZMethod, SevenZMethod, SevenZMethod and SevenZMethod are supported.
The methods will be consulted in iteration order to create the final output.
public Iterable<? extends SevenZMethodConfiguration > getContentMethods()
Currently only SevenZMethod, SevenZMethod, SevenZMethod and SevenZMethod are supported.
The methods will be consulted in iteration order to create the final output.
public static DatentfsTimeToJavaTime(long ntfsTime)
ntfsTime - the NTFS time in 100 nanosecond units
public static long javaTimeToNtfsTime(Datedate)
date - the Java time