waitFor

Waits till the operation is complete for the duration that is specified. Call isComplete after this method, to check whether the operation completed or if this method timed out.

Throws

if thread is interrupted while waiting