| Modifier and Type | Class and Description |
|---|---|
| protected static class | TarGenerator.
Slots for supplicant files and input streams to be added to a Tar archive. |
| Modifier and Type | Field and Description |
|---|---|
| protected TarFileOutputStream | |
| protected List | |
| protected long |
| Access | Constructor and Description |
|---|---|
| public | TarGenerator(File
Absolute or relative (from user.dir) File for
tar file to be created. getName() Suffix must
indicate tar file and may indicate a compression
method. inFile, boolean True to replace an existing file of same path. overWrite, Integer Null will use default tar value. blocksPerRecord)Compression is determined directly by the suffix of the file name in the specified path. |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public void | |
| public void | |
| public void | |
| public void | queueEntry(String
String entryPath, InputStream InputStream inStream, int int maxBytes)This method does not support Pax Interchange Format, nor data sizes greater than 2G. |
| public void | setPaxThreshold(long
long paxThreshold)When data file is this size or greater, in bytes, a Pix Interchange Format 'x' record will be created and used for the file entry. |
| public void |
| archive | back to summary |
|---|---|
| protected TarFileOutputStream archive | |
| entryQueue | back to summary |
|---|---|
| protected List<TarGenerator. | |
| paxThreshold | back to summary |
|---|---|
| protected long paxThreshold | |
| TarGenerator | back to summary |
|---|---|
| public TarGenerator(File inFile, boolean overWrite, Integer blocksPerRecord) throws IOException Compression is determined directly by the suffix of the file name in the specified path.
| |
| getPaxThreshold | back to summary |
|---|---|
public long getPaxThreshold()
| |
| queueEntry | back to summary |
|---|---|
| public void queueEntry(File file) throws FileNotFoundException, TarMalformatException | |
| queueEntry | back to summary |
|---|---|
| public void queueEntry(String entryPath, File file) throws FileNotFoundException, TarMalformatException | |
| queueEntry | back to summary |
|---|---|
| public void queueEntry(String entryPath, InputStreamInterface is) throws FileNotFoundException, TarMalformatException | |
| queueEntry | back to summary |
|---|---|
| public void queueEntry(String entryPath, InputStream inStream, int maxBytes) throws IOException, TarMalformatException This method does not support Pax Interchange Format, nor data sizes greater than 2G. This limitation may or may not be eliminated in the future.
| |
| setPaxThreshold | back to summary |
|---|---|
| public void setPaxThreshold(long paxThreshold) When data file is this size or greater, in bytes, a Pix Interchange Format 'x' record will be created and used for the file entry. Limitation At this time, PAX is only implemented for entries added as Files, not entries added as Stream.
| |
| write | back to summary |
|---|---|
| public void write() throws IOException, TarMalformatException This method does release all of the streams, even if there is a failure.
| |
| Modifier and Type | Field and Description |
|---|---|
| protected long | |
| public static final String | |
| protected String | |
| pack-priv static final byte[] | |
| protected InputStreamInterface | |
| protected long | |
| protected String | |
| protected boolean | |
| protected final long | |
| protected byte[] | |
| pack-priv static Character | |
| protected TarFileOutputStream | |
| pack-priv static final byte[] |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | TarEntrySupplicant(String
String path, File File file, TarFileOutputStream TarFileOutputStream tarStream, long long paxThreshold)After instantiating a TarEntrySupplicant, the user must either invoke write() or close(), to release system resources on the input File/Stream. |
| public | TarEntrySupplicant(String path, InputStreamInterface is, TarFileOutputStream tarStream, long paxThreshold)
|
| public | TarEntrySupplicant(String
String path, InputStream InputStream origStream, int This method will fail if more than maxBytes bytes
are supplied on the specified InputStream.
As the type of this parameter enforces, the max
size you can request is 2GB. maxBytes, char char typeFlag, TarFileOutputStream TarFileOutputStream tarStream)After instantiating a TarEntrySupplicant, the user must either invoke write() or close(), to release system resources on the input File/Stream. |
| Modifier and Type | Method and Description |
|---|---|
| protected static void | |
| protected void | |
| public void | |
| public long | |
| protected static String | Returns: StringFile file)This method is so-named because it only sets the owner privileges, not any "group" or "other" privileges. |
| public String | |
| protected long | |
| public TarGenerator. | |
| public static String | |
| public void | |
| protected static void | |
| protected static void | |
| protected void | |
| protected void | |
| protected void |
| dataSize | back to summary |
|---|---|
| protected long dataSize | |
| DEFAULT_FILE_MODES | back to summary |
|---|---|
| public static final String DEFAULT_FILE_MODES | |
| fileMode | back to summary |
|---|---|
| protected String fileMode | |
| HEADER_TEMPLATE | back to summary |
|---|---|
| pack-priv static final byte[] HEADER_TEMPLATE | |
| inputStream | back to summary |
|---|---|
| protected InputStreamInterface inputStream | |
| modTime | back to summary |
|---|---|
| protected long modTime | |
| path | back to summary |
|---|---|
| protected String path | |
| paxSized | back to summary |
|---|---|
| protected boolean paxSized | |
| paxThreshold | back to summary |
|---|---|
| protected final long paxThreshold | |
| rawHeader | back to summary |
|---|---|
| protected byte[] rawHeader | |
| swapOutDelim | back to summary |
|---|---|
| pack-priv static Character swapOutDelim | |
| tarStream | back to summary |
|---|---|
| protected TarFileOutputStream tarStream | |
| ustarBytes | back to summary |
|---|---|
| pack-priv static final byte[] ustarBytes | |
| TarEntrySupplicant | back to summary |
|---|---|
| protected TarEntrySupplicant(String path, char typeFlag, TarFileOutputStream tarStream, long paxThreshold) throws TarMalformatException | |
| TarEntrySupplicant | back to summary |
|---|---|
| public TarEntrySupplicant(String path, File file, TarFileOutputStream tarStream, long paxThreshold) throws FileNotFoundException, TarMalformatException After instantiating a TarEntrySupplicant, the user must either invoke write() or close(), to release system resources on the input File/Stream.
| |
| TarEntrySupplicant | back to summary |
|---|---|
| public TarEntrySupplicant(String path, InputStreamInterface is, TarFileOutputStream tarStream, long paxThreshold) throws TarMalformatException | |
| TarEntrySupplicant | back to summary |
|---|---|
| public TarEntrySupplicant(String path, InputStream origStream, int maxBytes, char typeFlag, TarFileOutputStream tarStream) throws IOException, TarMalformatException After instantiating a TarEntrySupplicant, the user must either invoke write() or close(), to release system resources on the input File/Stream. Warning Do not use this method unless the quantity of available RAM is sufficient to accommodate the specified maxBytes all at one time. This constructor loads all input from the specified InputStream into RAM before anything is written to disk.
| |
| clearField | back to summary |
|---|---|
| protected static void clearField(TarHeaderField field, byte[] target) | |
| clearField | back to summary |
|---|---|
| protected void clearField(TarHeaderField field) | |
| close | back to summary |
|---|---|
| public void close() throws IOException | |
| getDataSize | back to summary |
|---|---|
| public long getDataSize() | |
| getLameMode | back to summary |
|---|---|
| protected static String getLameMode(File file) This method is so-named because it only sets the owner privileges, not any "group" or "other" privileges. This is because of Java limitation. Incredibly, with Java 1.6, the API gives you the power to set privileges for "other" (last nibble in file Mode), but no ability to detect the same. | |
| getPath | back to summary |
|---|---|
| public String getPath() | |
| headerChecksum | back to summary |
|---|---|
| protected long headerChecksum() | |
| makeXentry | back to summary |
|---|---|
| public TarGenerator. This creates a 'x' entry for a 0/\0 entry.
| |
| prePaddedOctalString | back to summary |
|---|---|
| public static String prePaddedOctalString(long val, int width) | |
| write | back to summary |
|---|---|
| public void write() throws IOException, TarMalformatException Writes entire entry to this object's tarStream. This method is guaranteed to close the supplicant's input stream.
| |
| writeField | back to summary |
|---|---|
| protected static void writeField(TarHeaderField field, String newValue, byte[] target) throws TarMalformatException | |
| writeField | back to summary |
|---|---|
| protected static void writeField(TarHeaderField field, long newValue, byte[] target) throws TarMalformatException | |
| writeField | back to summary |
|---|---|
| protected void writeField(TarHeaderField field, String newValue) throws TarMalformatException | |
| writeField | back to summary |
|---|---|
| protected void writeField(TarHeaderField field, long newValue) throws TarMalformatException | |
| writeField | back to summary |
|---|---|
| protected void writeField(TarHeaderField field, char c) throws TarMalformatException | |