} catch ( MalformedURLException e ) {
throw new FreedbException("The URL: "+url+" is invalid, correct the server setting");
}
assert url != null;
URLConnection connection = null;
try {
connection = url.openConnection();
setupProxy(connection);
connection.setDoOutput( true );
PrintWriter out = new PrintWriter(connection.getOutputStream() );
// System.out.println( "cmd=" + servercommand + "&hello=" + clientLogin + "+" + clientDomain + "+" + softwareName + "+" + softwareVersion + "&proto=6");
out.println( "cmd=" + command + "&hello=" + this.settings.getUserLogin() + "+" + this.settings.getUserDomain() + "+" + this.settings.getClientName() + "+" + this.settings.getClientVersion() + "&proto="+ this.settings.getProtocol() );
out.close();
} catch ( IOException e ) {
//e.printStackTrace();
throw new FreedbException( "Error while trying to connect to freedb server, "+e.getMessage()+". Check your internet connection settings." );
}
assert connection != null;
String output = null;
try {
InputStreamReader isr;
try {
isr = new InputStreamReader( connection.getInputStream(), "UTF-8" );
} catch( UnsupportedEncodingException ex) {
isr = new InputStreamReader( connection.getInputStream() );
}
BufferedReader in = new BufferedReader( isr );
String inputLine;