code: public static DataChecksum newDataChecksum( DataInputStream in )
                                   throws IOException {
      int type = in.readByte();
      int bpc = in.readInt();
      DataChecksum summer = newDataChecksum( type, bpc );
      if ( summer == null ) {
        throw new IOException( "Could not create DataChecksum of type " +
                               type + " with bytesPerChecksum " + bpc );
      }
      return summer;
    }
docs: This constructucts a DataChecksum by reading HEADER_LEN bytes from
  input stream <i>in</i>