cfg.addInputStream( ConfigHelper.getResourceAsStream( resourceName ) ); fail();
/** * Get the configuration file as an <tt>InputStream</tt>. Might be overridden * by subclasses to allow the configuration to be located by some arbitrary * mechanism. * <p/> * By default here we use classpath resource resolution * * @param resource The resource to locate * * @return The stream * * @throws HibernateException Generally indicates we cannot find the named resource */ protected InputStream getConfigurationInputStream(String resource) throws HibernateException { LOG.configurationResource( resource ); return ConfigHelper.getResourceAsStream( resource ); }
/** * Get the configuration file as an <tt>InputStream</tt>. Might be overridden * by subclasses to allow the configuration to be located by some arbitrary * mechanism. * <p/> * By default here we use classpath resource resolution * * @param resource The resource to locate * * @return The stream * * @throws HibernateException Generally indicates we cannot find the named resource */ protected InputStream getConfigurationInputStream(String resource) throws HibernateException { LOG.configurationResource( resource ); return ConfigHelper.getResourceAsStream( resource ); }
try { final String resourceName = currentFile.trim(); InputStream stream = ConfigHelper.getResourceAsStream( resourceName ); importFileReaders.add( new NamedReader( resourceName, stream ) );
try { final String resourceName = currentFile.trim(); InputStream stream = ConfigHelper.getResourceAsStream( resourceName ); importFileReaders.add( new NamedReader( resourceName, stream ) );