public void readFields(DataInput in) throws IOException {
    this.offset = in.readLong();
    this.length = in.readLong();
    this.corrupt = in.readBoolean();
    int numNames = in.readInt();
    this.names = new String[numNames];
    for (int i = 0; i < numNames; i++) {
      Text name = new Text();
      name.readFields(in);
      names[i] = name.toString();
    }
    int numHosts = in.readInt();
    for (int i = 0; i < numHosts; i++) {
      Text host = new Text();
      host.readFields(in);
      hosts[i] = host.toString();
    }
    int numTops = in.readInt();
    Text path = new Text();
    for (int i = 0; i < numTops; i++) {
      path.readFields(in);
      topologyPaths[i] = path.toString();
    }
  }
public void readFields ( DataInput in ) throws IOException { this . offset = in . readLong ( ) ; this . length = in . readLong ( ) ; this . corrupt = in . readBoolean ( ) ; int numNames = in . readInt ( ) ; this . names = new String [ numNames ] ; for ( int i = 0 ; i < numNames ; i ++ ) { Text name = new Text ( ) ; name . readFields ( in ) ; names [ i ] = name . toString ( ) ; } int numHosts = in . readInt ( ) ; for ( int i = 0 ; i < numHosts ; i ++ ) { Text host = new Text ( ) ; host . readFields ( in ) ; hosts [ i ] = host . toString ( ) ; } int numTops = in . readInt ( ) ; Text path = new Text ( ) ; for ( int i = 0 ; i < numTops ; i ++ ) { path . readFields ( in ) ; topologyPaths [ i ] = path . toString ( ) ; } }
Implement readFields of Writable