Top Description Fields Constructors Methods
org.apache.tools.tar

public Class TarArchiveSparseEntry

extends Object
implements TarConstants
Class Inheritance
All Implemented Interfaces
org.apache.tools.tar.TarConstants
Imports
java.io.IOException

This class represents a sparse entry in a Tar archive.

The C structure for a sparse entry is:

struct posix_header {
struct sparse sp[21]; // TarConstants.SPARSELEN_GNU_SPARSE     - offset 0
char isextended;      // TarConstants.ISEXTENDEDLEN_GNU_SPARSE - offset 504
};
Whereas, "struct sparse" is:
struct sparse {
char offset[12];   // offset 0
char numbytes[12]; // offset 12
};

Field Summary

Modifier and TypeField and Description
private boolean
isExtended

If an extension sparse header follows.

Constructor Summary

AccessConstructor and Description
public
TarArchiveSparseEntry(byte[]
The header bytes from a tar archive entry.
headerBuf
)

Construct an entry from an archive's header bytes.

Method Summary

Modifier and TypeMethod and Description
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isExtendedback to summary
private boolean isExtended

If an extension sparse header follows.

Constructor Detail

TarArchiveSparseEntryback to summary
public TarArchiveSparseEntry(byte[] headerBuf) throws IOException

Construct an entry from an archive's header bytes. File is set to null.

Parameters
headerBuf:byte[]

The header bytes from a tar archive entry.

Exceptions
IOException:
on unknown format

Method Detail

isExtendedback to summary
public boolean isExtended()