Package net.minecraftforge.srg2source.util.io

Examples of net.minecraftforge.srg2source.util.io.InputSupplier


    }
   
    @Test
    public void testGatherAll() throws IOException
    {
        InputSupplier supp = new MultiDirSupplier(dirs);
       
        // gather all the relative paths
        for (String rel : supp.gatherAll(END))
        {
            Assert.assertTrue(expectedFiles.containsValue(rel));
        }
       
        supp.close(); // to please the compiler..
    }
View Full Code Here


    }
   
    @Test
    public void testGetRoot() throws IOException
    {
        InputSupplier supp = new MultiDirSupplier(dirs);
       
        for (File dir : expectedFiles.keySet())
        {
            for (String rel : expectedFiles.get(dir))
            {
                Assert.assertEquals(dir, new File(supp.getRoot(rel)).getCanonicalFile());
            }
        }
       
        supp.close(); // to please the compiler..
    }
View Full Code Here

        File rangemap = getRangeMap();
        File rangelog = File.createTempFile("rangelog", ".txt", this.getTemporaryDir());
        FileCollection srg = getSrgs();
        FileCollection exc = getExcs();
       
        InputSupplier inSup;
       
        if (ins.size() == 0)
            return; // no input.
        else if (ins.size() == 1)
        {
            // just 1 supplier.
            inSup = getInput(ins.get(0));
        }
        else
        {
            // multinput
            inSup = new SequencedInputSupplier();
            for (File f : ins)
                ((SequencedInputSupplier) inSup).add(getInput(f));
        }
       
        OutputSupplier outSup;
        if (ins.size() == 1 && ins.get(0).equals(out) && ins instanceof FolderSupplier)
            outSup = (OutputSupplier) inSup;
        else
            outSup = getOutput(out);
       
        getLogger().lifecycle("remapping source...");
        applyRangeMap(inSup, outSup, srg, exc, rangemap, rangelog);
       
       
        inSup.close();
        outSup.close();
    }
View Full Code Here

    public void doTask() throws IOException
    {
        List<File> ins = getIn();
        File rangemap = getRangeMap();
       
        InputSupplier inSup;
       
        if (ins.size() == 0)
            return; // no input.
        else if (ins.size() == 1)
        {
View Full Code Here

TOP

Related Classes of net.minecraftforge.srg2source.util.io.InputSupplier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.