Class DumpArchiveSummary
java.lang.Object
org.apache.commons.compress.archivers.dump.DumpArchiveSummary
This class represents identifying information about a Dump archive volume.
It consists the archive's dump date, label, hostname, device name and possibly
last mount point plus the volume's volume id and first record number.
For the corresponding C structure see the header of DumpArchiveEntry.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the device name, e.g., /dev/sda3 or /dev/mapper/vg0-home.Gets the date of this dump.Gets the last mountpoint, e.g., /home.intGets the inode of the first record on this volume.intgetFlags()Gets the miscellaneous flags.Gets the hostname of the system where the dump was performed.getLabel()Gets dump label.intgetLevel()Gets the level of this dump.intgetNTRec()Gets the number of records per tape block.Gets the date of the previous dump at this level higher.intGets volume (tape) number.inthashCode()booleanIs this volume compressed? N.B., individual blocks may or may not be compressed.booleanDoes this volume contain extended attributes.booleanDoes this volume only contain metadata?booleanIs this the new header format? (We do not currently support the old format.)booleanIs this the new inode format? (We do not currently support the old format.)voidsetDevname(String devname) Sets the device name.voidsetDumpDate(Date dumpDate) Sets dump date.voidsetFilesystem(String fileSystem) Sets the last mountpoint.voidsetFirstRecord(int firstrec) Sets the inode of the first record.voidsetFlags(int flags) Sets the miscellaneous flags.voidsetHostname(String hostname) Sets the hostname.voidSets dump label.voidsetLevel(int level) Sets level.voidsetNTRec(int ntrec) Sets the number of records per tape block.voidsetPreviousDumpDate(Date previousDumpDate) Sets previous dump date.voidsetVolume(int volume) Sets volume (tape) number.
-
Field Details
-
dumpDate
private long dumpDate -
previousDumpDate
private long previousDumpDate -
volume
private int volume -
label
-
level
private int level -
filesys
-
devname
-
hostname
-
flags
private int flags -
firstrec
private int firstrec -
ntrec
private int ntrec
-
-
Constructor Details
-
DumpArchiveSummary
DumpArchiveSummary(byte[] buffer, ZipEncoding encoding) throws IOException - Throws:
IOException
-
-
Method Details
-
equals
-
getDevname
Gets the device name, e.g., /dev/sda3 or /dev/mapper/vg0-home.- Returns:
- device name
-
getDumpDate
Gets the date of this dump.- Returns:
- the date of this dump.
-
getFilesystem
Gets the last mountpoint, e.g., /home.- Returns:
- last mountpoint
-
getFirstRecord
public int getFirstRecord()Gets the inode of the first record on this volume.- Returns:
- inode of the first record on this volume.
-
getFlags
public int getFlags()Gets the miscellaneous flags. See below.- Returns:
- flags
-
getHostname
Gets the hostname of the system where the dump was performed.- Returns:
- hostname the host name
-
getLabel
Gets dump label. This may be autogenerated, or it may be specified by the user.- Returns:
- dump label
-
getLevel
public int getLevel()Gets the level of this dump. This is a number between 0 and 9, inclusive, and a level 0 dump is a complete dump of the partition. For any other dump 'n' this dump contains all files that have changed since the last dump at this level or lower. This is used to support different levels of incremental backups.- Returns:
- dump level
-
getNTRec
public int getNTRec()Gets the number of records per tape block. This is typically between 10 and 32.- Returns:
- the number of records per tape block
-
getPreviousDumpDate
Gets the date of the previous dump at this level higher.- Returns:
- dumpdate may be null
-
getVolume
public int getVolume()Gets volume (tape) number.- Returns:
- volume (tape) number.
-
hashCode
public int hashCode() -
isCompressed
public boolean isCompressed()Is this volume compressed? N.B., individual blocks may or may not be compressed. The first block is never compressed.- Returns:
- true if volume is compressed
-
isExtendedAttributes
public boolean isExtendedAttributes()Does this volume contain extended attributes.- Returns:
- true if volume contains extended attributes.
-
isMetaDataOnly
public boolean isMetaDataOnly()Does this volume only contain metadata?- Returns:
- true if volume only contains meta-data
-
isNewHeader
public boolean isNewHeader()Is this the new header format? (We do not currently support the old format.)- Returns:
- true if using new header format
-
isNewInode
public boolean isNewInode()Is this the new inode format? (We do not currently support the old format.)- Returns:
- true if using new inode format
-
setDevname
Sets the device name.- Parameters:
devname- the device name
-
setDumpDate
Sets dump date.- Parameters:
dumpDate- the dump date
-
setFilesystem
Sets the last mountpoint.- Parameters:
fileSystem- the last mountpoint
-
setFirstRecord
public void setFirstRecord(int firstrec) Sets the inode of the first record.- Parameters:
firstrec- the first record
-
setFlags
public void setFlags(int flags) Sets the miscellaneous flags.- Parameters:
flags- flags
-
setHostname
Sets the hostname.- Parameters:
hostname- the host name
-
setLabel
Sets dump label.- Parameters:
label- the label
-
setLevel
public void setLevel(int level) Sets level.- Parameters:
level- the level
-
setNTRec
public void setNTRec(int ntrec) Sets the number of records per tape block.- Parameters:
ntrec- the number of records per tape block
-
setPreviousDumpDate
Sets previous dump date.- Parameters:
previousDumpDate- the previous dump dat
-
setVolume
public void setVolume(int volume) Sets volume (tape) number.- Parameters:
volume- the volume number
-