Browse Source

provide more information

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@326804 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
e7e85f299e
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      src/main/org/apache/tools/tar/TarOutputStream.java

+ 6
- 2
src/main/org/apache/tools/tar/TarOutputStream.java View File

@@ -44,6 +44,7 @@ public class TarOutputStream extends FilterOutputStream {

protected boolean debug;
protected long currSize;
protected String currName;
protected long currBytes;
protected byte[] oneBuf;
protected byte[] recordBuf;
@@ -191,6 +192,7 @@ public class TarOutputStream extends FilterOutputStream {
} else {
this.currSize = entry.getSize();
}
currName = entry.getName();
}

/**
@@ -216,7 +218,8 @@ public class TarOutputStream extends FilterOutputStream {
}

if (this.currBytes < this.currSize) {
throw new IOException("entry closed at '" + this.currBytes
throw new IOException("entry '" + currName + "' closed at '"
+ this.currBytes
+ "' before the '" + this.currSize
+ "' bytes specified in the header were written");
}
@@ -266,7 +269,8 @@ public class TarOutputStream extends FilterOutputStream {
if ((this.currBytes + numToWrite) > this.currSize) {
throw new IOException("request to write '" + numToWrite
+ "' bytes exceeds size in header of '"
+ this.currSize + "' bytes");
+ this.currSize + "' bytes for entry '"
+ currName + "'");

//
// We have to deal with assembly!!!


Loading…
Cancel
Save