class DownloadInfo implements Parcelable, Comparable<DownloadInfo> {

    public void setNumPieces(int numPieces)
    {
        if (numPieces <= 0)
            throw new IllegalArgumentException("Piece number can't be less or equal zero");

        if (!partialSupport && numPieces > 1)
            throw new IllegalStateException("The download doesn't support partial download");

        if ((totalBytes <= 0 && numPieces != 1) || (totalBytes > 0 && totalBytes < numPieces))
            throw new IllegalStateException("The number of pieces can't be more than the number of total bytes");

        this.numPieces = numPieces;
    }

    public  DownloadInfo(@NonNull Uri dirPath,
                        @NonNull String url,
                        @NonNull String fileName);
    @Ignore public  DownloadInfo(@NonNull Parcel source);

}