@@ -0,0 +1,1610 @@
+package com.dnanexus;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0A%0A/**%0A * Utility class for handling job input and output.%0A */%0Apublic class DXUtil %7B%0A%0A    /**%0A     * Working directory of the applet. This is the directory where the job_input.json and%0A     * job_output.json files are to be found. We record this once at application startup to protect%0A     * ourselves against possible subsequent changes to the working directory.%0A     */%0A    private static final String startupDirectory;%0A%0A    private static final ObjectMapper mapper = new ObjectMapper();%0A%0A    static %7B%0A        startupDirectory = System.getProperty(%22user.dir%22);%0A    %7D%0A%0A%0A    /**%0A     * Obtains the job input and deserializes it to the specified class.%0A     *%0A     * @param valueType class to deserialize job input to%0A     *%0A     * @return job input%0A     */%0A    public static %3CT%3E T getJobInput(Class%3CT%3E valueType) %7B%0A        String jobInputPath = startupDirectory + %22/job_input.json%22;%0A        try %7B%0A            return DXJSON.safeTreeToValue(mapper.readTree(new File(jobInputPath)), valueType);%0A        %7D catch (IOException e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%0A    /**%0A     * Writes the job output.%0A     *%0A     * @param object object to be JSON serialized%0A     */%0A    public static void writeJobOutput(Object object) %7B%0A        String jobOutputPath = startupDirectory + %22/job_output.json%22;%0A        try %7B%0A            mapper.writeValue(new File(jobOutputPath), object);%0A        %7D catch (IOException e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%7D%0A

Add DXUtil class to facilitate applet I/O.