commit | 1eb9dbb7fd336b1e8a160977722b570354040798 | [log] [tgz] |
---|---|---|
author | Stefan Bodewig <bodewig@apache.org> | Tue Oct 26 09:44:59 2010 +0000 |
committer | Stefan Bodewig <bodewig@apache.org> | Tue Oct 26 09:44:59 2010 +0000 |
tree | 68b94aace853f88ee133c654e9ffae79f49421b2 | |
parent | 80c0d2c08c851350d46c21ebafbbf9d9f5ad67b8 [diff] |
write all buffered data to the stream in TarArchiveOutputStream#finish. COMPRESS-119 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/compress/trunk@1027427 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/changes/changes.xml b/src/changes/changes.xml index aef63ea..0d32019 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml
@@ -44,7 +44,12 @@ <title>commons-compress</title> </properties> <body> - <release version="1.1" date="as in SVN" description="Release 1.1"> + <release version="1.2" date="as in SVN" description="Release 1.2"> + <action issue="COMPRESS-119" type="fix" date="2010-10-26"> + TarArchiveOutputStream#finish now writes all buffered data ot the stream + </action> + </release> + <release version="1.1" date="2010-08-13" description="Release 1.1"> <action issue="COMPRESS-72" type="fix" date="2010-06-02"> Move acknowledgements from NOTICE to README </action>
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java index 0db3c56..bda7ad5 100644 --- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
@@ -123,6 +123,7 @@ } writeEOFRecord(); writeEOFRecord(); + buffer.flushBlock(); finished = true; }
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarBuffer.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarBuffer.java index 3b57aff..14f1e29 100644 --- a/src/main/java/org/apache/commons/compress/archivers/tar/TarBuffer.java +++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarBuffer.java
@@ -379,7 +379,7 @@ /** * Flush the current data block if it has any data in it. */ - private void flushBlock() throws IOException { + void flushBlock() throws IOException { if (outStream == null) { throw new IOException("writing to an input buffer"); }