class FileData implements Serializable {

  public int getContentAsCounterValue(int numCounter) {

    Assert.getInstance().greaterOrEqual(numCounter, 1, "numCounter");

    byte[] rec1 = records.get(1);
    if (rec1 == null) {
      throw new NoSuchElementException("Record #1 is not set.");
    }
    int counterIndex = (numCounter - 1) * 3;
    if (counterIndex >= rec1.length) {
      throw new NoSuchElementException(
          "Counter #"
              + numCounter
              + " is not set (nb of actual counters = "
              + (rec1.length / 3)
              + ").");
    }
    if (counterIndex + 3 > rec1.length) {
      throw new IndexOutOfBoundsException(
          "Counter #"
              + numCounter
              + " has a truncated value (nb of actual counters = "
              + (rec1.length / 3)
              + ").");
    }
    return ByteArrayUtil.threeBytesToInt(rec1, counterIndex);
  }

    FileData();
    FileData(FileData source);

}