Package com.github.junrar.rarfile
Class MainHeader
- java.lang.Object
-
- com.github.junrar.rarfile.BaseBlock
-
- com.github.junrar.rarfile.MainHeader
-
public class MainHeader extends BaseBlock
The main header of an rar archive. holds information concerning the whole archive (solid, encrypted etc).- Version:
- $LastChangedRevision$
-
-
Field Summary
Fields Modifier and Type Field Description private byteencryptVersionprivate shorthighPosAvprivate static org.slf4j.Loggerloggerstatic shortmainHeaderSizestatic shortmainHeaderSizeWithEncprivate intposAv-
Fields inherited from class com.github.junrar.rarfile.BaseBlock
BaseBlockSize, EARC_DATACRC, EARC_NEXT_VOLUME, EARC_REVSPACE, EARC_VOLNUMBER, flags, headCRC, headerSize, headerType, LHD_COMMENT, LHD_DIRECTORY, LHD_EXTFLAGS, LHD_EXTTIME, LHD_LARGE, LHD_PASSWORD, LHD_SALT, LHD_SOLID, LHD_SPLIT_AFTER, LHD_SPLIT_BEFORE, LHD_UNICODE, LHD_VERSION, LHD_WINDOW1024, LHD_WINDOW128, LHD_WINDOW2048, LHD_WINDOW256, LHD_WINDOW4096, LHD_WINDOW512, LHD_WINDOW64, LHD_WINDOWMASK, LONG_BLOCK, MHD_AV, MHD_COMMENT, MHD_ENCRYPTVER, MHD_FIRSTVOLUME, MHD_LOCK, MHD_NEWNUMBERING, MHD_PACK_COMMENT, MHD_PASSWORD, MHD_PROTECT, MHD_SOLID, MHD_VOLUME, positionInFile, SKIP_IF_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description MainHeader(BaseBlock bb, byte[] mainHeader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytegetEncryptVersion()the version the the encryptionshortgetHighPosAv()intgetPosAv()booleanhasArchCmt()old cmt block is presentbooleanisAV()booleanisEncrypted()returns whether the archive is encryptedbooleanisFirstVolume()booleanisLocked()booleanisMultiVolume()booleanisNewNumbering()booleanisProtected()booleanisSolid()voidprint()-
Methods inherited from class com.github.junrar.rarfile.BaseBlock
getFlags, getHeadCRC, getHeaderSize, getHeaderSize, getHeaderType, getPositionInFile, hasArchiveDataCRC, hasEncryptVersion, hasVolumeNumber, isSubBlock, setPositionInFile
-
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
mainHeaderSizeWithEnc
public static final short mainHeaderSizeWithEnc
- See Also:
- Constant Field Values
-
mainHeaderSize
public static final short mainHeaderSize
- See Also:
- Constant Field Values
-
highPosAv
private final short highPosAv
-
posAv
private final int posAv
-
encryptVersion
private byte encryptVersion
-
-
Constructor Detail
-
MainHeader
public MainHeader(BaseBlock bb, byte[] mainHeader)
-
-
Method Detail
-
hasArchCmt
public boolean hasArchCmt()
old cmt block is present- Returns:
- true if has cmt block
-
getEncryptVersion
public byte getEncryptVersion()
the version the the encryption- Returns:
- .
-
getHighPosAv
public short getHighPosAv()
-
getPosAv
public int getPosAv()
-
isEncrypted
public boolean isEncrypted()
returns whether the archive is encrypted- Returns:
- .
-
isMultiVolume
public boolean isMultiVolume()
- Returns:
- whether the archive is a multivolume archive
-
isFirstVolume
public boolean isFirstVolume()
- Returns:
- if the archive is a multivolume archive this method returns whether this instance is the first part of the multivolume archive
-
isSolid
public boolean isSolid()
- Returns:
- whether this archive is solid. in this case you can only extract all file at once
-
isLocked
public boolean isLocked()
-
isProtected
public boolean isProtected()
-
isAV
public boolean isAV()
-
isNewNumbering
public boolean isNewNumbering()
- Returns:
- the numbering format a multivolume archive
-
-