Code example for Scanner

Methods: closeuseDelimiter

0
	public void use(boolean enable) {
		glUseProgram(enable ? shaderProgram : 0);
	} 
	 
	private String readFile(String resource) {
		Scanner scanner = new Scanner(ResourceLoader.getResourceAsStream(resource));
		String data = scanner.useDelimiter("\\Z").next();
		scanner.close();
		return data;
	} 
}