public boolean ackNextChunkId(String id){
  if (state.isTerminated())   return false;
 else   if (id.equals(chunkid)) {
    return true;
  }
 else {
    if (!allowOtherChunksInBetween(id)) {
      if (state.isDone()) {
        if (!isTerminated())         terminate();
        return false;
      }
 else {
        throw new PngjInputException("Unexpected chunk " + id + " while "+ chunkid+ " set is not done");
      }
    }
 else     return true;
  }
}

public boolean ackNextChunkId ( String id ) { if ( state . isTerminated ( ) ) return false ; else if ( id . equals ( chunkid ) ) { return true ; } else { if ( ! allowOtherChunksInBetween ( id ) ) { if ( state . isDone ( ) ) { if ( ! isTerminated ( ) ) terminate ( ) ; return false ; } else { throw new PngjInputException ( "Unexpected chunk " + id + " while " + chunkid + " set is not done" ) ; } } else return true ; } }
this will be called by the owner to report us the next chunk to come . we can make our own internal changes and checks . this returns true if we acknowledge the next chunk as part of this set
