/** * Returns the inputstream for the resource specified by the <strong>relative</strong> name. * * @param name the name of the resource relative to the given class * @param context the source class * @return the url of the resource or null, if not found. */ public static InputStream getResourceRelativeAsStream ( final String name, final Class context ) { final URL url = getResourceRelative( name, context ); if ( url == null ) { return null; } try { return url.openStream(); } catch ( IOException e ) { return null; } }
/** * Returns the inputstream for the resource specified by the <strong>relative</strong> name. * * @param name the name of the resource relative to the given class * @param context the source class * @return the url of the resource or null, if not found. */ public static InputStream getResourceRelativeAsStream (final String name, final Class context) { final URL url = getResourceRelative(name, context); if (url == null) { return null; } try { return url.openStream(); } catch (IOException e) { return null; } }
ClassicEngineBoot.getInstance().start(); final ReportGenerator gen = ReportGenerator.getInstance(); final URL reportURL = ObjectUtilities.getResourceRelative( REFERENCE_REPORT, StyleKeyReferenceGenerator.class ); if ( reportURL == null ) { System.err.println( "The report was not found in the classpath" ); //$NON-NLS-1$
ClassicEngineBoot.getInstance().start(); final ReportGenerator gen = ReportGenerator.getInstance(); final URL reportURL = ObjectUtilities.getResourceRelative( REFERENCE_REPORT, DataSourceReferenceGenerator.class ); if ( reportURL == null ) { System.err.println( "The report was not found in the classpath" ); //$NON-NLS-1$
ClassicEngineBoot.getInstance().start(); final ReportGenerator gen = ReportGenerator.getInstance(); final URL reportURL = ObjectUtilities.getResourceRelative( REFERENCE_REPORT, ObjectReferenceGenerator.class ); if ( reportURL == null ) { System.err.println( "The report was not found in the classpath" ); //$NON-NLS-1$