/**
  * specifies if this piece is part of the read cache or the write cache.
  *
  * @return
  */
 public Kind getKind() {
   return Kind.fromSwig(i.getKind().swigValue());
 }
 /**
  * The index of the next block that needs to be hashed. Blocks are hashed as they are downloaded
  * in order to not have to re-read them from disk once the piece is complete, to compare its hash
  * against the hashes in the .torrent file.
  *
  * @return
  */
 public int getNextToHash() {
   return i.getNext_to_hash();
 }
 /**
  * holds one entry for each block in this piece. ``true`` represents the data for that block being
  * in the disk cache and ``false`` means it's not.
  *
  * @return
  */
 public boolean[] getBlocks() {
   return Vectors.bool_vector2booleans(i.getBlocks());
 }
 /**
  * the time when a block was last written to this piece. The older a piece is, the more likely it
  * is to be flushed to disk.
  *
  * @return
  */
 public PTime getLastUse() {
   return new PTime(i.getLast_use());
 }
 /**
  * the piece index for this cache entry.
  *
  * @return
  */
 public int getPiece() {
   return i.getPiece();
 }