V
V
Vlad1612014-01-26 17:53:56
Java
Vlad161, 2014-01-26 17:53:56

How to implement a Java file resume?

There is a client-server program with a typical file transfer in pieces through sockets

while ((bytesRead = in.read(mybytearray, 0, mybytearray.length)) != -1) {
                bos.write(mybytearray, 0, bytesRead);
            }

The full code can be viewed here .
There is data on which place the download was interrupted, that is, how much was downloaded, how to make the program "download" the file from that very place? For example, there is a file weighing 33345 bytes, during the jump there was a break and 25000 bytes were downloaded, how to make the program start downloading this file from 25000 bytes? I don't know where to pass this number.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vlad161, 2014-01-26
@Vlad161

Already suggested, here is the answer

T
Toseter, 2014-01-26
@Toseter

greenbytes.de/tech/webdav/draft-ietf-httpbis-p5-ra...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question