Fixed buffer position and limit handling in Resource.readAsBytes
This commit is contained in:
parent
6afb7f8f1b
commit
fcf5da731f
@ -66,7 +66,10 @@ public class Resource extends Named {
|
|||||||
output = BufferUtils.createByteBuffer(byteArray.length);
|
output = BufferUtils.createByteBuffer(byteArray.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int position = output.position();
|
||||||
output.put(byteArray);
|
output.put(byteArray);
|
||||||
|
output.limit(output.position());
|
||||||
|
output.position(position);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user