| java.lang.Object java.io.OutputStream java.io.FilterOutputStream de.masters_of_disaster.ant.tasks.ar.ArOutputStream
ArOutputStream | public class ArOutputStream extends FilterOutputStream (Code) | | The ArOutputStream writes an ar archive as an OutputStream.
Methods are provided to put entries, and then write their contents
by writing to this stream using write().
|
Field Summary | |
final public static int | LONGFILE_BSD BSD ar variant is used to store long file names and file names with spaced in the archive. | final public static int | LONGFILE_ERROR Fail if a long file name is required in the archive or the name contains spaces. | final public static int | LONGFILE_GNU GNU ar variant is used to store long file names and file names with spaced in the archive. | final public static int | LONGFILE_TRUNCATE Long paths will be truncated in the archive. | protected int | currBytes | protected int | currSize | protected boolean | inEntry | protected int | longFileMode | protected byte[] | oneBuf | protected boolean | writingStarted |
Method Summary | |
public void | closeEntry() Close an entry. | public void | putNextEntry(ArEntry entry) Put an entry on the output stream. | public void | setLongFileMode(int longFileMode) | public void | write(int b) Writes a byte to the current ar archive entry. | public void | write(byte[] wBuf) Writes bytes to the current ar archive entry. | public void | write(byte[] wBuf, int wOffset, int numToWrite) Writes bytes to the current ar archive entry. |
LONGFILE_BSD | final public static int LONGFILE_BSD(Code) | | BSD ar variant is used to store long file names and file names with spaced in the archive.
|
LONGFILE_ERROR | final public static int LONGFILE_ERROR(Code) | | Fail if a long file name is required in the archive or the name contains spaces.
|
LONGFILE_GNU | final public static int LONGFILE_GNU(Code) | | GNU ar variant is used to store long file names and file names with spaced in the archive.
|
LONGFILE_TRUNCATE | final public static int LONGFILE_TRUNCATE(Code) | | Long paths will be truncated in the archive. Spaces are replaced by '_'
|
currBytes | protected int currBytes(Code) | | |
currSize | protected int currSize(Code) | | |
inEntry | protected boolean inEntry(Code) | | |
longFileMode | protected int longFileMode(Code) | | |
oneBuf | protected byte[] oneBuf(Code) | | |
writingStarted | protected boolean writingStarted(Code) | | |
closeEntry | public void closeEntry() throws IOException(Code) | | Close an entry. This method MUST be called for all file
entries that contain data. The reason is that we must
pad an entries data if it is of odd size.
|
putNextEntry | public void putNextEntry(ArEntry entry) throws IOException(Code) | | Put an entry on the output stream. This writes the entry's
header record and positions the output stream for writing
the contents of the entry. Once this method is called, the
stream is ready for calls to write() to write the entry's
contents. Once the contents are written, closeEntry()
MUST be called to ensure that all buffered data
is completely written to the output stream.
Parameters: entry - The ArEntry to be written to the archive. |
setLongFileMode | public void setLongFileMode(int longFileMode)(Code) | | |
write | public void write(int b) throws IOException(Code) | | Writes a byte to the current ar archive entry.
This method simply calls write( byte[], int, int ).
Parameters: b - The byte to write to the archive. |
write | public void write(byte[] wBuf) throws IOException(Code) | | Writes bytes to the current ar archive entry.
This method simply calls write( byte[], int, int ).
Parameters: wBuf - The buffer to write to the archive. |
write | public void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException(Code) | | Writes bytes to the current ar archive entry. This method
is aware of the current entry and will throw an exception if
you attempt to write bytes past the length specified for the
current entry.
Parameters: wBuf - The buffer to write to the archive. Parameters: wOffset - The offset in the buffer from which to get bytes. Parameters: numToWrite - The number of bytes to write. |
|
|