Possible Duplicate:
Country name with space not accepted in BlackBerry ObjectChoiceField
I have been researching a lot on how to append % 20 to a space. I used code from a couple of StackOverflow questions but none seem to work.
There is no way I am using POST. How can I use URLEncodedPostData and remove spaces in the url?
I am fetching response from my local server using the following code.
ConnectionFactory connFact = new ConnectionFactory();
ConnectionDescriptor connDesc;
connDesc = connFact.getConnection("http://www.XXXXXX.com/XXXXX/?
InputStream isText = httpConn.openInputStream();
byte[] bytes=new byte[isText.available()];
isText.read(bytes);
final String s = new String(bytes);
System.out.println(" SERVER RETURNS = "+s);
if(s.equals("successfull"))//&& loginid.indexOf("@"))
{
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
Dialog.alert(("Registration success"));
}
}
}