Description
Call to StorageConnector.getStorageAs(InputStream.class) returns an InputStream which does not read from the beginning of the stream if a call to StorageConnection.getStorageAs(…) has been done before for another type.
The fix is to use InputStream.mark() when the other type is created and InputStream.reset() when the InputStream is requested.