コード例 #1
0
 @Override
 public int available() throws IOException {
   int available = super.available();
   if (available == 0) {
     callback.finish();
   }
   return available;
 }
コード例 #2
0
 @Override
 public void close() throws IOException {
   if (totalRead == fileSize) {
     callback.finish();
   } else {
     callback.failed();
   }
   super.close();
 }