@ SuppressWarnings ( "rawtypes" ) public Object getContent ( URLConnection urlc , Class [ ] classes ) throws IOException { Object obj = getContent ( urlc ) ; for ( int i = 0 ; i < classes . length ; i ++ ) { if ( classes [ i ] . isInstance ( obj ) ) { return obj ; } } return null ; }
Given a URL connect stream positioned at the beginning of the representation of an object this method reads that stream and creates an object that matches one of the types specified .