OPENJPA-402 Complete .class file read in ZipFileMetaDataIterator

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@584420 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2007-10-13 16:12:35 +00:00
parent 2d6fbb5d13
commit cc5e5a36fa
1 changed files with 6 additions and 1 deletions

View File

@ -142,7 +142,12 @@ public class ZipFileMetaDataIterator
content = bout.toByteArray();
} else {
content = new byte[(int) size];
in.read(content);
int offset = 0;
int read;
while (offset < size &&
(read = in.read(content, offset, (int) size - offset)) != -1) {
offset += read;
}
}
in.close();
return content;