Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
Wenn dir der Server vor dem Download die Größe mitteilt, dann kannst du den Fortschritt in % ermitteln: erhaltene Bytes / alle Bytes * 100.
...und große Daten sollte man streamen ...
int bytesRead = 0;
for (int i = 0; i < len; i++)
{
bytesRead += super.read(b, i, 1);
}
return bytesRead;
int bytesRead = 0;
int stepSize = getStepSize();
for (int i = 0; i < len;)
{
bytesRead += super.read(b, i, stepSize);
i+=stepSize;
}
return bytesRead;
the total number of bytes read into the buffer,
or -1 if there is no more data because the end of the file has been reached
also ich weis nicht was ich jetzt anders gemacht habe aber jetzt gehts...
Performance mäßig ist es allerdings immer noch eher schlecht (sehr schlecht:noe🙂
Mit meinem WrapperStream dauert der Transfer(lokal) einer 16MB grossen Datei ca. 17 Sekunden und ohne 94 ms. Also schon gewaltiger Unterschied...