/** * Write an EOF (end of archive) record to the tar archive. * An EOF record consists of a record of all zeros. */ private void writeEOFRecord() throws IOException { for (int i = 0; i < this.recordBuf.length; ++i) { this.recordBuf[i] = 0; } this.buffer.writeRecord(this.recordBuf); } }
/** * Write an EOF (end of archive) record to the tar archive. * An EOF record consists of a record of all zeros. */ private void writeEOFRecord() throws IOException { for (int i = 0; i < recordBuf.length; ++i) { recordBuf[i] = 0; } buffer.writeRecord(recordBuf); }
/** * Close an entry. This method MUST be called for all file * entries that contain data. The reason is that we must * buffer data written to the stream in order to satisfy * the buffer's record based writes. Thus, there may be * data fragments still being assembled that must be written * to the output stream before this entry is closed and the * next entry written. * @throws IOException on error */ public void closeEntry() throws IOException { if (this.assemLen > 0) { for (int i = this.assemLen; i < this.assemBuf.length; ++i) { this.assemBuf[i] = 0; } this.buffer.writeRecord(this.assemBuf); this.currBytes += this.assemLen; this.assemLen = 0; } if (this.currBytes < this.currSize) { throw new IOException("entry '" + currName + "' closed at '" + this.currBytes + "' before the '" + this.currSize + "' bytes specified in the header were written"); } }
System.arraycopy(wBuf, wOffset, this.recordBuf, this.assemLen, aLen); this.buffer.writeRecord(this.recordBuf); this.buffer.writeRecord(wBuf, wOffset);
buffer.writeRecord(assemBuf);
System.arraycopy(wBuf, wOffset, recordBuf, assemLen, aLen); buffer.writeRecord(recordBuf); buffer.writeRecord(wBuf, wOffset);
this.buffer.writeRecord(this.recordBuf);
buffer.writeRecord(recordBuf);
/** * Write an EOF (end of archive) record to the tar archive. * An EOF record consists of a record of all zeros. */ private void writeEOFRecord() throws IOException { for (int i = 0; i < this.recordBuf.length; ++i) { this.recordBuf[i] = 0; } this.buffer.writeRecord(this.recordBuf); } }
/** * Write an EOF (end of archive) record to the tar archive. * An EOF record consists of a record of all zeros. */ private void writeEOFRecord() throws IOException { for (int i = 0; i < this.recordBuf.length; ++i) { this.recordBuf[i] = 0; } this.buffer.writeRecord(this.recordBuf); } }
/** * Write an EOF (end of archive) record to the tar archive. * An EOF record consists of a record of all zeros. */ private void writeEOFRecord() throws IOException { for (int i = 0; i < this.recordBuf.length; ++i) { this.recordBuf[i] = 0; } this.buffer.writeRecord(this.recordBuf); } }
/** * Write an EOF (end of archive) record to the tar archive. * An EOF record consists of a record of all zeros. */ private void writeEOFRecord() throws IOException { for (int i = 0; i < this.recordBuf.length; ++i) { this.recordBuf[i] = 0; } this.buffer.writeRecord(this.recordBuf); } }
/** * Write an EOF (end of archive) record to the tar archive. * An EOF record consists of a record of all zeros. */ private void writeEOFRecord() throws IOException { for (int i = 0; i < this.recordBuf.length; ++i) { this.recordBuf[i] = 0; } this.buffer.writeRecord(this.recordBuf); } }
/** * Close an entry. This method MUST be called for all file * entries that contain data. The reason is that we must * buffer data written to the stream in order to satisfy * the buffer's record based writes. Thus, there may be * data fragments still being assembled that must be written * to the output stream before this entry is closed and the * next entry written. * @throws IOException on error */ public void closeEntry() throws IOException { if (this.assemLen > 0) { for (int i = this.assemLen; i < this.assemBuf.length; ++i) { this.assemBuf[i] = 0; } this.buffer.writeRecord(this.assemBuf); this.currBytes += this.assemLen; this.assemLen = 0; } if (this.currBytes < this.currSize) { throw new IOException("entry '" + currName + "' closed at '" + this.currBytes + "' before the '" + this.currSize + "' bytes specified in the header were written"); } }
/** * Close an entry. This method MUST be called for all file * entries that contain data. The reason is that we must * buffer data written to the stream in order to satisfy * the buffer's record based writes. Thus, there may be * data fragments still being assembled that must be written * to the output stream before this entry is closed and the * next entry written. * @throws IOException on error */ public void closeEntry() throws IOException { if (this.assemLen > 0) { for (int i = this.assemLen; i < this.assemBuf.length; ++i) { this.assemBuf[i] = 0; } this.buffer.writeRecord(this.assemBuf); this.currBytes += this.assemLen; this.assemLen = 0; } if (this.currBytes < this.currSize) { throw new IOException("entry '" + currName + "' closed at '" + this.currBytes + "' before the '" + this.currSize + "' bytes specified in the header were written"); } }
/** * Close an entry. This method MUST be called for all file * entries that contain data. The reason is that we must * buffer data written to the stream in order to satisfy * the buffer's record based writes. Thus, there may be * data fragments still being assembled that must be written * to the output stream before this entry is closed and the * next entry written. * @throws IOException on error */ public void closeEntry() throws IOException { if (this.assemLen > 0) { for (int i = this.assemLen; i < this.assemBuf.length; ++i) { this.assemBuf[i] = 0; } this.buffer.writeRecord(this.assemBuf); this.currBytes += this.assemLen; this.assemLen = 0; } if (this.currBytes < this.currSize) { throw new IOException("entry '" + currName + "' closed at '" + this.currBytes + "' before the '" + this.currSize + "' bytes specified in the header were written"); } }
/** * Close an entry. This method MUST be called for all file * entries that contain data. The reason is that we must * buffer data written to the stream in order to satisfy * the buffer's record based writes. Thus, there may be * data fragments still being assembled that must be written * to the output stream before this entry is closed and the * next entry written. * @throws IOException on error */ public void closeEntry() throws IOException { if (this.assemLen > 0) { for (int i = this.assemLen; i < this.assemBuf.length; ++i) { this.assemBuf[i] = 0; } this.buffer.writeRecord(this.assemBuf); this.currBytes += this.assemLen; this.assemLen = 0; } if (this.currBytes < this.currSize) { throw new IOException("entry '" + currName + "' closed at '" + this.currBytes + "' before the '" + this.currSize + "' bytes specified in the header were written"); } }
/** * Close an entry. This method MUST be called for all file * entries that contain data. The reason is that we must * buffer data written to the stream in order to satisfy * the buffer's record based writes. Thus, there may be * data fragments still being assembled that must be written * to the output stream before this entry is closed and the * next entry written. * @throws IOException on error */ public void closeEntry() throws IOException { if (this.assemLen > 0) { for (int i = this.assemLen; i < this.assemBuf.length; ++i) { this.assemBuf[i] = 0; } this.buffer.writeRecord(this.assemBuf); this.currBytes += this.assemLen; this.assemLen = 0; } if (this.currBytes < this.currSize) { throw new IOException("entry '" + currName + "' closed at '" + this.currBytes + "' before the '" + this.currSize + "' bytes specified in the header were written"); } }
this.buffer.writeRecord(this.recordBuf);
this.buffer.writeRecord(this.recordBuf);