with InStream.setPosition(0) it works fine. "Elementary my dear Watson" !!
One more question : how can I close and re-open any fileStream into the same function?
There are no functions as FileInputStream.open() or close().
Open and close happens in the constructor and destructor respectively.
BTW Jules, the writeFromInputStream() can write an ammount of data up to int64 in size, but the returning number of written bytes is much smaller (a simlpe int).