Hi there
i'm trying to get the files but face the issue that the get method returns a stream whose size:
- equals 0 through stream.available(), so the byte array is empty when reading the stream
- returns a size which is bigger than it should through getContentLength(). In that case i do receive a stream which contains the file somehow... but the file appears to be corrupted, with lots of trailing 00 bytes...
ConsumingInputStream stream = sardine.get( theUrl);
long size= stream.getContentLength();//inputStream.available();
then writing with some basic :
FileOutputStream outStream = new FileOutputStream(targetFile);
outStream.write(buffer);
outStream.flush();
outStream.close();
thanks for the help!
Hi there
i'm trying to get the files but face the issue that the get method returns a stream whose size:
ConsumingInputStream stream = sardine.get( theUrl);
long size= stream.getContentLength();//inputStream.available();
then writing with some basic :
FileOutputStream outStream = new FileOutputStream(targetFile);
outStream.write(buffer);
outStream.flush();
outStream.close();
thanks for the help!