InputStream primaryStream = InternalResources.class.getResourceAsStream(RESOURCE_LOCATION + primaryLanguage + ".properties"); InputStream secondaryStream = InternalResources.class.getResourceAsStream(RESOURCE_LOCATION + secondaryLanguage + ".properties");
InputStream primaryStream = null; InputStream secondaryStream = null; if (test) { primaryLanguage = "se"; secondaryLanguage = "en"; try { primaryStream = new FileInputStream("src/intresources/intresources." + primaryLanguage + ".properties"); secondaryStream = new FileInputStream("src/intresources/intresources." + secondaryLanguage + ".properties"); } catch (FileNotFoundException e) {} } else { primaryStream = InternalResources.class.getResourceAsStream(RESOURCE_LOCATION + primaryLanguage + ".properties"); secondaryStream = InternalResources.class.getResourceAsStream(RESOURCE_LOCATION + secondaryLanguage + ".properties"); }
	protected InternalResources(){				String primaryLanguage = GlobalConfiguration.PREFEREDINTERNALRESOURCES.toLowerCase();		String secondaryLanguage = GlobalConfiguration.SECONDARYINTERNALRESOURCES.toLowerCase();				InputStream primaryStream = InternalResources.class.getResourceAsStream(RESOURCE_LOCATION + primaryLanguage + ".properties");		InputStream secondaryStream = InternalResources.class.getResourceAsStream(RESOURCE_LOCATION + secondaryLanguage + ".properties");				try {			primaryResource.load(primaryStream);			secondaryResource.load(secondaryStream);		} catch (IOException e) {						throw new EJBException("Error reading internal resourcefile", e);		}			}