package com.novoda.downloadmanager;

public final class DownloadBatchIdCreator {

    private DownloadBatchIdCreator() {
        // non-instantiable class
    }

    /**
     * Sanitizes the given rawId replacing any of [:\\\\/*?|<>] with an underscore
     * before returning an instance of {@link DownloadBatchId}.
     *
     * @param rawId to be sanitized before creating {@link DownloadBatchId}.
     * @return an instance of {@link DownloadBatchId}.
     */
    public static DownloadBatchId createSanitizedFrom(String rawId) {
        String sanitizedBatchId = sanitizeBatchId(rawId);
        return new LiteDownloadBatchId(sanitizedBatchId);
    }

    private static String sanitizeBatchId(String batchIdPath) {
        return batchIdPath.replaceAll("[:\\\\/*?|<>]", "_");
    }
}

@@ -213,16 +213,23 @@
  any of 
+%7B@code 
 %5B:%5C%5C%5C%5C/*
@@ -233,16 +233,17 @@
 %5C/*?%7C%3C%3E%5D
+%7D
  with an

Fix javadoc.