Code example for SortedSet

Methods: first, isEmpty

0
	 * @param token 
	 * @param responseParameters 
	 */ 
	protected void setTokenExpirationTime(LinkedInOAuthToken token,
			SortedSet<String> responseParameters) {
		if (responseParameters != null && !responseParameters.isEmpty()) {
			Calendar calendar = Calendar.getInstance();
			int secondsToLive = Integer.valueOf(responseParameters.first());
			calendar.add(Calendar.SECOND, secondsToLive);
			token.setExpirationTime(calendar.getTime());
		} 
	} 
 
	/** 
	 * Stolen liberally from http://www.kodejava.org/examples/266.html 
	 */ 
	protected static String convertStreamToString(InputStream is) {
        /* 
         * To convert the InputStream to String we use the BufferedReader.readLine() 
         * method. We iterate until the BufferedReader return null which means 
         * there's no more data to read. Each line will appended to a StringBuilder