public Map < String, String > generate(File xmlSchemaFile, String encoding,
            String packageName) throws Xsd2ConverterException {
        try {
            Reader reader = new InputStreamReader(new FileInputStream(xmlSchemaFile),
                    encoding);
            return generate(reader, packageName);
        } catch (UnsupportedEncodingException e) {
            throw new Xsd2ConverterException(e);
        } catch (FileNotFoundException e) {
            throw new Xsd2ConverterException(e);
        }
    }
public Map < String , String > generate ( File xmlSchemaFile , String encoding , String packageName ) throws Xsd2ConverterException { try { Reader reader = new InputStreamReader ( new FileInputStream ( xmlSchemaFile ) , encoding ) ; return generate ( reader , packageName ) ; } catch ( UnsupportedEncodingException e ) { throw new Xsd2ConverterException ( e ) ; } catch ( FileNotFoundException e ) { throw new Xsd2ConverterException ( e ) ; } }
Given a COBOL annotated XML schema, produce a set of java classes (source
code) used to convert mainframe data at runtime.

@param xmlSchemaFile the COBOL-annotated XML schema file (see legstar-cob2xsd)
@param encoding the character encoding for xmlSchemaFile
@param packageName the java package the generated classes should reside
in
@return a map of java class names to their source code
@throws Xsd2ConverterException if generation fails