///////////////////////////////////////////
 // Writable
 ///////////////////////////////////////////
 public void write(DataOutput out) throws IOException {
   blockToken.write(out);
   out.writeBoolean(corrupt);
   out.writeLong(offset);
   b.write(out);
   out.writeInt(locs.length);
   for (int i = 0; i < locs.length; i++) {
     locs[i].write(out);
   }
 }
 public void readFields(DataInput in) throws IOException {
   blockToken.readFields(in);
   this.corrupt = in.readBoolean();
   offset = in.readLong();
   this.b = new Block();
   b.readFields(in);
   int count = in.readInt();
   this.locs = new DatanodeInfo[count];
   for (int i = 0; i < locs.length; i++) {
     locs[i] = new DatanodeInfo();
     locs[i].readFields(in);
   }
 }
 public long getBlockSize() {
   return b.getNumBytes();
 }