• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please see the code

 
vishwas bhatt
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
Please see this code...on Connection fail i want to display a message.
it is not working.
//================================Start=====================================
try
{
InputStream is = conn.openDataInputStream();

byte[] byteArray = new byte[1024];
int oneByte = is.read();
sb = new StringBuffer();
while (oneByte != -1)
{
sb.append((char) oneByte);
byteArray[length] = (byte)oneByte;
oneByte = is.read();
length++;
}
}
catch(Exception e)
{
parent.setDisplayable(new ErrorScreen("Network Bussy!"));

}
//================================End=======================================
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic