SERVICE_BASEURL +
"radio/np.php" +
"?session=" +sessionToken.getSessionId() +
"&debug=0"
);
HttpRequest request = requestFactory.getRequest(RequestType.QUERY, url);
if(connectTimeout>0) {
request.setConnectTimeout(connectTimeout);
}
if(readTimeout>0) {
request.setReadTimeout(readTimeout);
}
// Execute the request
request.execute();
// Handle response
resultStream = request.getResponseStream();
HashMap<String,String> parameter = ResponseUtil.getParameterMap(resultStream);
if( !parameter.containsKey("streaming")
|| "false".equals(parameter.get("streaming")) ) {
throw new IllegalStateException("Method getMp3Stream() has to be called first.");