public void ViewLogo()
{
// HttpConnection httpConn = null;
DataInputStream is = null;
StringBuffer sb = new StringBuffer();
Image img= null;
System.out.println("Value of sResultLogooo:"+sResultLogo);
String url = sResultLogo;
System.out.println("URL :logo11 method:::"+url);
try
{
HttpConnection httpConn1 = (HttpConnection) Connector.open(url);
int len = (int)httpConn1.getLength();
System.out.println("length logo:"+len);
System.out.println("check logo::"+url);
if (len > 0)
{
is = httpConn1.openDataInputStream();
byte[] data = new byte[len];
is.readFully(data);
img = Image.createImage(data, 0, len);
Form f = new Form("Logo");
// ImageItem imgItem = new ImageItem("", img, ImageItem.LAYOUT_NEWLINE_AFTER | ImageItem.LAYOUT_CENTER, null);
ImageItem imgItem = new ImageItem("",img,ImageItem.LAYOUT_RIGHT,null);
f.addCommand(CMD_BackToViewCompanyProfileDetailsForm);
f.append(imgItem);
f.setCommandListener(this);
display.setCurrent(f);
}
else
{
System.out.println("length is null");
displayAlert("Information","No Image found.",AlertType.ERROR, mainForm, false);
}
is.close();
httpConn1.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}