public byte[] readNextPart() throws JPlagException {
  if (remainingBytes == 0) {
    throw new JPlagException("downloadException","There's nothing left to be downloaded!","");
  }
  try {
    FileInputStream in=new FileInputStream(file);
    in.skip(filesize - remainingBytes);
    int partsize=remainingBytes;
    if (partsize > 81920)     partsize=81920;
    byte[] data=new byte[partsize];
    in.read(data);
    in.close();
    remainingBytes-=partsize;
    return data;
  }
 catch (  IOException e) {
    e.printStackTrace();
    throw new JPlagException("downloadException","Unable to read" + " submission part from server!","");
  }
}

public byte [ ] readNextPart ( ) throws JPlagException { if ( remainingBytes == 0 ) { throw new JPlagException ( "downloadException" , "There's nothing left to be downloaded!" , "" ) ; } try { FileInputStream in = new FileInputStream ( file ) ; in . skip ( filesize - remainingBytes ) ; int partsize = remainingBytes ; if ( partsize > 81920 ) partsize = 81920 ; byte [ ] data = new byte [ partsize ] ; in . read ( data ) ; in . close ( ) ; remainingBytes -= partsize ; return data ; } catch ( IOException e ) { e . printStackTrace ( ) ; throw new JPlagException ( "downloadException" , "Unable to read" + " submission part from server!" , "" ) ; } }
reads the next part of the related file
