コード例 #1
0
ファイル: Zone.java プロジェクト: krbaker/jmfs
  @Override
  public String toString() {
    StringBuffer sb = new StringBuffer(getClass().getSimpleName());
    sb.append(" {")
        .append(
            Utils.printf(
                "startBlockPrimary=%d\0"
                    + "startBlockBackup=%d\0"
                    + "first=%d\0"
                    + "last=%d\0"
                    + "size=%d\0"
                    + "free=%d\0"
                    + "length=%d\0"
                    + "min=%d\0"
                    + "logStamp=%d\0"
                    + "checksum=0x%08X (valid=%B)\0"
                    + "zero=%d\0"
                    + "num=%d\0"
                    + "type=%s\0"
                    + "next=%s\0"
                    + "extra=%d",
                descriptorStartBlock,
                backupStartBlock,
                dataStartBlocks,
                dataEndBlock,
                dataSize,
                freeDataBlocks,
                descriptorSize,
                min,
                logStamp,
                checksum,
                validCrc,
                zero,
                num,
                type,
                next,
                (extra == null) ? 0 : extra.length))
        .append("}\n")
        .append("Bitmaps: {");

    StringBuffer b = new StringBuffer();
    int num = 0;
    for (Bitmap bmp : bitmaps) b.append(Utils.printf("[%d]: %s", num++, bmp.toString()));

    sb.append(Utils.printf("ints=%s\0" + "bitmaps=%s", Arrays.asList(ints), b.toString()));

    return sb.toString();
  }