@Override
    public int calculateCapacity(int requiredLength) {
      return Math.min((int)(requiredLength * 1.05), (requiredLength / 1024 + 1) * 1024);
    }
@Override
    public int calculateCapacity(int requiredLength)