Top Description Fields Constructors Methods
org.apache.commons.compress.archivers.dump

public Class DumpArchiveSummary

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.Date, .Objects, org.apache.commons.compress.archivers.zip.ZipEncoding

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

Modifier and TypeField and Description
private String
private long
private String
private int
private int
private String
private String
private int
private int
private long
private int

Constructor Summary

AccessConstructor and Description
pack-priv
DumpArchiveSummary(final byte[] buffer, final ZipEncoding encoding)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public String

Returns:

device name
getDevname
()

Gets the device name, e.g., /dev/sda3 or /dev/mapper/vg0-home.

public Date

Returns:

the date of this dump.
getDumpDate
()

Gets the date of this dump.

public String

Returns:

last mountpoint
getFilesystem
()

Gets the last mountpoint, e.g., /home.

public int

Returns:

inode of the first record on this volume.
getFirstRecord
()

Gets the inode of the first record on this volume.

public int

Returns:

flags
getFlags
()

Gets the miscellaneous flags.

public String

Returns:

hostname the host name
getHostname
()

Gets the hostname of the system where the dump was performed.

public String

Returns:

dump label
getLabel
()

Gets dump label.

public int

Returns:

dump level
getLevel
()

Gets the level of this dump.

public int

Returns:

the number of records per tape block
getNTRec
()

Gets the number of records per tape block.

public Date

Returns:

dumpdate may be null
getPreviousDumpDate
()

Gets the date of the previous dump at this level higher.

public int

Returns:

volume (tape) number.
getVolume
()

Gets volume (tape) number.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public boolean

Returns:

true if volume is compressed
isCompressed
()

Is this volume compressed?

public boolean

Returns:

true if volume contains extended attributes.
isExtendedAttributes
()

Does this volume contain extended attributes.

public boolean

Returns:

true if volume only contains meta-data
isMetaDataOnly
()

Does this volume only contain metadata?

public boolean

Returns:

true if using new header format
isNewHeader
()

Is this the new header format?

public boolean

Returns:

true if using new inode format
isNewInode
()

Is this the new inode format?

public void
setDevname(final String
the device name
devname
)

Sets the device name.

public void
setDumpDate(final Date
the dump date
dumpDate
)

Sets dump date.

public void
setFilesystem(final String
the last mountpoint
fileSystem
)

Sets the last mountpoint.

public void
setFirstRecord(final int
the first record
firstrec
)

Sets the inode of the first record.

public void
setFlags(final int
flags
flags
)

Sets the miscellaneous flags.

public void
setHostname(final String
the host name
hostname
)

Sets the hostname.

public void
setLabel(final String
the label
label
)

Sets dump label.

public void
setLevel(final int
the level
level
)

Sets level.

public void
setNTRec(final int
the number of records per tape block
ntrec
)

Sets the number of records per tape block.

public void
setPreviousDumpDate(final Date
the previous dump dat
previousDumpDate
)

Sets previous dump date.

public void
setVolume(final int
the volume number
volume
)

Sets volume (tape) number.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

devnameback to summary
private String devname
dumpDateback to summary
private long dumpDate
filesysback to summary
private String filesys
firstrecback to summary
private int firstrec
flagsback to summary
private int flags
hostnameback to summary
private String hostname
labelback to summary
private String label
levelback to summary
private int level
ntrecback to summary
private int ntrec
previousDumpDateback to summary
private long previousDumpDate
volumeback to summary
private int volume

Constructor Detail

DumpArchiveSummaryback to summary
pack-priv DumpArchiveSummary(final byte[] buffer, final ZipEncoding encoding) throws IOException

Method Detail

equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

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.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getDevnameback to summary
public String getDevname()

Gets the device name, e.g., /dev/sda3 or /dev/mapper/vg0-home.

Returns:String

device name

getDumpDateback to summary
public Date getDumpDate()

Gets the date of this dump.

Returns:Date

the date of this dump.

getFilesystemback to summary
public String getFilesystem()

Gets the last mountpoint, e.g., /home.

Returns:String

last mountpoint

getFirstRecordback to summary
public int getFirstRecord()

Gets the inode of the first record on this volume.

Returns:int

inode of the first record on this volume.

getFlagsback to summary
public int getFlags()

Gets the miscellaneous flags. See below.

Returns:int

flags

getHostnameback to summary
public String getHostname()

Gets the hostname of the system where the dump was performed.

Returns:String

hostname the host name

getLabelback to summary
public String getLabel()

Gets dump label. This may be autogenerated, or it may be specified by the user.

Returns:String

dump label

getLevelback to summary
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:int

dump level

getNTRecback to summary
public int getNTRec()

Gets the number of records per tape block. This is typically between 10 and 32.

Returns:int

the number of records per tape block

getPreviousDumpDateback to summary
public Date getPreviousDumpDate()

Gets the date of the previous dump at this level higher.

Returns:Date

dumpdate may be null

getVolumeback to summary
public int getVolume()

Gets volume (tape) number.

Returns:int

volume (tape) number.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
isCompressedback to summary
public boolean isCompressed()

Is this volume compressed? N.B., individual blocks may or may not be compressed. The first block is never compressed.

Returns:boolean

true if volume is compressed

isExtendedAttributesback to summary
public boolean isExtendedAttributes()

Does this volume contain extended attributes.

Returns:boolean

true if volume contains extended attributes.

isMetaDataOnlyback to summary
public boolean isMetaDataOnly()

Does this volume only contain metadata?

Returns:boolean

true if volume only contains meta-data

isNewHeaderback to summary
public boolean isNewHeader()

Is this the new header format? (We do not currently support the old format.)

Returns:boolean

true if using new header format

isNewInodeback to summary
public boolean isNewInode()

Is this the new inode format? (We do not currently support the old format.)

Returns:boolean

true if using new inode format

setDevnameback to summary
public void setDevname(final String devname)

Sets the device name.

Parameters
devname:String

the device name

setDumpDateback to summary
public void setDumpDate(final Date dumpDate)

Sets dump date.

Parameters
dumpDate:Date

the dump date

setFilesystemback to summary
public void setFilesystem(final String fileSystem)

Sets the last mountpoint.

Parameters
fileSystem:String

the last mountpoint

setFirstRecordback to summary
public void setFirstRecord(final int firstrec)

Sets the inode of the first record.

Parameters
firstrec:int

the first record

setFlagsback to summary
public void setFlags(final int flags)

Sets the miscellaneous flags.

Parameters
flags:int

flags

setHostnameback to summary
public void setHostname(final String hostname)

Sets the hostname.

Parameters
hostname:String

the host name

setLabelback to summary
public void setLabel(final String label)

Sets dump label.

Parameters
label:String

the label

setLevelback to summary
public void setLevel(final int level)

Sets level.

Parameters
level:int

the level

setNTRecback to summary
public void setNTRec(final int ntrec)

Sets the number of records per tape block.

Parameters
ntrec:int

the number of records per tape block

setPreviousDumpDateback to summary
public void setPreviousDumpDate(final Date previousDumpDate)

Sets previous dump date.

Parameters
previousDumpDate:Date

the previous dump dat

setVolumeback to summary
public void setVolume(final int volume)

Sets volume (tape) number.

Parameters
volume:int

the volume number