protected InputStream open ( ) { try { if ( getType ( ) == null ) { throw new IllegalStateException ( String . format ( "Unknown type for %s" , this ) ) ; } URL location = getLocation ( ) ; return location == null ? System . in : ( stream_ = location . openStream ( ) ) ; } catch ( Exception e ) { throw new IllegalStateException ( String . format ( "Can't read %s" , this ) , e ) ; } }
Opens a stream to read the contents of this resource .