Alex, In ObjectOutputStream if you read byte array and still have some other data in the stream, it will return you -1. So as I understand, from user perspective it is normal to wait for -1. What do you think?
Vladimir. On Tue, Feb 16, 2016 at 2:54 PM, Alexey Goncharuk < [email protected]> wrote: > Agree that this should be fixed. However, from the end-user perspective > this should never be an issue because at some point in future Ignite might > need to append some extra bytes to the Externalizable object layout, thus > reading beyond that limit will break the unmarshalling process. > > If, by the time we invoke readExternal, we know the size of the written > externalizable object then we can create a thin wrapper around the existing > input stream which will provide the desired behavior. However, this will > come at a cost of generating more garbage, so I would just fix the return > value for the input stream. >
