diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/FileMetaDataIterator.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/FileMetaDataIterator.java index 168012cd3..8355e72a1 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/FileMetaDataIterator.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/FileMetaDataIterator.java @@ -147,7 +147,8 @@ public class FileMetaDataIterator implements MetaDataIterator { content = bout.toByteArray(); } else { content = new byte[(int) len]; - fin.read(content); + for (int r, o = 0; o < content.length && (r = fin. + read(content, o, content.length - o)) != -1; o += r); } return content; } finally {