Code example for PrintWriter

Methods: closeprintln

0
			System.exit(1);
		} 
		response.setContentType("text/plain");
		response.setStatus(200);
		PrintWriter writer = response.getWriter();
		writer.println("It just needed to be restarted!");
		writer.println("My application metadata: " + System.getenv("VCAP_APPLICATION"));
		writer.println("My port: " + System.getenv("PORT"));
		writer.println("My custom env variable: " + System.getenv("CUSTOM_VAR"));
		writer.close();
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE