Code example for UnsupportedEncodingException

Methods: toString

0
	private static InputSource xmlSourceUTF8 (URL url){
		Reader reader = null;
		try { 
			reader = new InputStreamReader(url.openStream(),"UTF-8");
		} catch (UnsupportedEncodingException e) {
			System.out.println(e.toString());
		} catch (IOException e) {
			System.out.println(e.toString());
		} 
 
		InputSource is = new InputSource(reader);
		is.setEncoding("UTF-8");
		return is;
	} 
	 
	/**		 
	 * generates the URL object for the request 
	 * @param a string containing the rest api call e.g.: user/login/username/password/ 
	 * @return the corresponding URL object 
	 */ 
	private static URL generateUrl(String rest){