class BreakpointInfo {

    public long getTotalLength() {
        if (isChunked()) return getTotalOffset();

        long length = 0;
        final Object[] blocks = blockInfoList.toArray();
        if (blocks != null) {
            for (Object block : blocks) {
                if (block instanceof BlockInfo) {
                    length += ((BlockInfo) block).getContentLength();
                }
            }
        }

        return length;
    }

    public  BreakpointInfo(int id, @NonNull String url, @NonNull File parentFile,
                          @Nullable String filename);
      BreakpointInfo(int id, @NonNull String url, @NonNull File parentFile,
                   @Nullable String filename, boolean taskOnlyProvidedParentPath);

}