mirror of https://github.com/apache/openjpa.git
Marc correctly pointed out that FileInputStream.read() isn't guaranteed to
read all available data into the given buffer in one call. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@431635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0821efea40
commit
daf1f35793
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue