java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.hsqldb.lib.tar.PIFGenerator
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Encapsulates Pax Interchange Format key-value pairs.
-
Constructor Summary
ConstructorsConstructorDescriptionPIFGenerator
(int sequenceNum) Construct a PIFGenerator object for a 'g' record.PIFGenerator
(File file) Construct a PIFGenerator object for a 'x' record. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Convenience wrapper for addRecord(String, String).void
Convenience wrapper for addRecord(String, String).void
Convenience wrapper for addRecord(String, String).void
I guess the "initial length" field is supposed to be in units of characters, not bytes?getName()
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
PIFGenerator
public PIFGenerator(int sequenceNum) Construct a PIFGenerator object for a 'g' record.- Parameters:
sequenceNum
- Index starts at 1 in each Tar file
-
PIFGenerator
Construct a PIFGenerator object for a 'x' record.- Parameters:
file
- Target file of the x record.
-
-
Method Details
-
getName
-
addRecord
Convenience wrapper for addRecord(String, String). N.b. this writes values exactly as either "true" or "false".- Parameters:
key
- Stringb
- boolean value- Throws:
TarMalformatException
- if there is a problem writing the tar fileIOException
- if there is an IO problem- See Also:
-
addRecord
Convenience wrapper for addRecord(String, String).- Parameters:
key
- Stringi
- int value- Throws:
TarMalformatException
- if there is a problem writing the tar fileIOException
- IOException if there is an IO problem- See Also:
-
addRecord
Convenience wrapper for addRecord(String, String).- Parameters:
key
- Stringl
- long value- Throws:
TarMalformatException
- if there is a problem writing the tar fileIOException
- if there is an IO problem- See Also:
-
addRecord
I guess the "initial length" field is supposed to be in units of characters, not bytes?- Parameters:
key
- Stringvalue
- String- Throws:
TarMalformatException
- if there is a problem writing the tar fileIOException
- if there is an IO problem
-