public Document parse(URLConnection uc, Element instruction,
			PrintWriter logger) throws SSLProtocolException {
		if (null == uc) {
			throw new NullPointerException(
					"Unable to parse resource: URLConnection is null.");
		}
		jlogger.fine("Received URLConnection object for " + uc.getURL());
		Document doc = null;
		try (InputStream inStream = URLConnectionUtils.getInputStream(uc)) {
			doc = parse(inStream, instruction, logger);
		} catch (SSLProtocolException sslep){
			throw new SSLProtocolException("[SSL ERROR] Failed to connect with the requested URL due to \"Invalid server_name\" found!! :" + uc.getURL() +":" + sslep.getClass() +" : "+ sslep.getMessage());
		} catch (Exception e) {
			throw new RuntimeException(
					String.format("Failed to parse resource from %s", uc.getURL()),
					e);
		}
		return doc;
	}
public Document parse ( URLConnection uc , Element instruction , PrintWriter logger ) throws SSLProtocolException { if ( null == uc ) { throw new NullPointerException ( "Unable to parse resource: URLConnection is null." ) ; } jlogger . fine ( "Received URLConnection object for " + uc . getURL ( ) ) ; Document doc = null ; try ( InputStream inStream = URLConnectionUtils . getInputStream ( uc ) ) { doc = parse ( inStream , instruction , logger ) ; } catch ( SSLProtocolException sslep ) { throw new SSLProtocolException ( "[SSL ERROR] Failed to connect with the requested URL due to \"Invalid server_name\" found!! :" + uc . getURL ( ) + ":" + sslep . getClass ( ) + " : " + sslep . getMessage ( ) ) ; } catch ( Exception e ) { throw new RuntimeException ( String . format ( "Failed to parse resource from %s" , uc . getURL ( ) ) , e ) ; } return doc ; }
Attempts to parse a resource read using the given connection to a URL.

@param uc
A connection for reading from some URL.
@param instruction
An Element node (ctlp:XMLValidatingParser) containing
instructions, usually schema references.
@param logger
A log writer.
@return A Document, or null if the resource could not be parsed.
@throws SSLProtocolException