package com.dsdev.assets;

import com.google.gson.stream.JsonReader;
import java.io.*;
import java.net.URL;
import org.apache.commons.io.FileUtils;

/**
 * This class contains all of the tools required to build and maintain a copy of
 * the Minecraft assets.
 *
 * @author Nathan2055
 */
public class AssetBuilder {

    /**
     * This method builds a fresh copy of the Minecraft assets in the provided
     * directory. If the directory already exists, it is deleted.
     *
     * @param directory A String representing the directory where the assets
     * should be created.
     * @throws java.io.IOException Of course. :P
     */
    public void buildAssets(String directory) throws IOException {
        // Let's start by setting up the folders we are gonna need
        File buffer = new File(directory + "/legacy");
        buffer.mkdirs();

        // Now let's download the version definition file from Mojang and store it in a temporary file
        File defFile = File.createTempFile("assets", ".json");
        URL defWeb = new URL("https://s3.amazonaws.com/Minecraft.Download/indexes/legacy.json");
        FileUtils.copyURLToFile(defWeb, defFile);

        // And now we parse...
        String defString = FileUtils.readFileToString(defFile);
        //JSON parsing code goes here
    }
}

@@ -1297,11 +1297,881 @@
 re%0A    %7D
+%0A%0A    /**%0A     * This method rechecks the asset files that have been downloaded and%0A     * updates them if necessary.%0A     *%0A     * @param directory%0A     */%0A    public void recheckAssets(String directory) %7B%0A        //TODO: Write code to recheck the asset files that have already been downloaded%0A    %7D%0A%0A    /**%0A     * This method will copy a set of downloaded assets to a Minecraft%0A     * directory.%0A     *%0A     * @param downloadedAssets The folder that contains an assets definition%0A     * downloaded using the buildAssets() method.%0A     * @param assetsType Either legacy or modern based on what version of%0A     * Minecraft you are using.%0A     * @param destFolder The destination folder for the assets.%0A     */%0A    public void copyAssets(String downloadedAssets, String assetsType, String destFolder) %7B%0A        //TODO: Create method to export the dwonloaded assets%0A    %7D
 %0A%7D%0A

Create future methods