A bug in the methods 'read(byte)' and 'read(byte,int,int)' in PositionedStoreStream can cause the position variable to be set to an incorrect value.
The bug is only triggered if one of the two read methods is invoked after EOF of the underlying stream has been reached.
If the bug is triggered, the position will be decreased by one because the underlying stream returns -1. Subsequent reads will further decrease the position. This can cause EOF-exceptions (during repositioning) or incorrect data being returned in subsequent calls.