private InputSource resolveFromURL(String systemId) throws IOException {
        log.debug("Trying to download [{}]", systemId);

        URL obj = new URL(systemId);
        HttpURLConnection conn = (HttpURLConnection)obj.openConnection();

        int status = conn.getResponseCode();
        if ((status != HttpURLConnection.HTTP_OK)
            && (status == HttpURLConnection.HTTP_MOVED_TEMP
             || status == HttpURLConnection.HTTP_MOVED_PERM
             || status == HttpURLConnection.HTTP_SEE_OTHER)) {

            log.debug("Received status of {}, attempting to follow Location header", status);

            String newUrl = conn.getHeaderField("Location");
            conn = (HttpURLConnection)new URL(newUrl).openConnection();
        }

        return new InputSource(conn.getInputStream());
    }
NOTE: GitHub.io returns 301 so we need to handle redirection here, else SAX fails.

@param systemId systemId used by XSD
@return stream to XSD
@throws IOException if fails to find XSD
core/src/main/java/com/github/dozermapper/core/loader/xml/DozerResolver.java