Calling skip method on XAFileInputStream generate IllegalArgumentException due to wrongly calculated readPositionAfterSkip.
This variable is evaluated with this expression:
(NativeXAFileInputStream.java line 175)
long readPositionAfterSkip = (position - byteBuffer.remaining()) + n;
Using a position equals to 0 and skipping 200 bytes with a generic file larger than 200 bytes this expression return a negative value and than, the subsequential calling to "position(readPositionAfterSkip)" method, will throws IllegalArgumentException.
Why don't simply use this?
long readPositionAfterSkip = position + n;