Code:
String url = "star.png"
// place server 64bit, star.png(128,128)
HttpConnection str = (HttpConnection) Connector.open(url);
byte[] baResult = null;
input = str.openInputStream();
DataBuffer db = new DataBuffer();
int len = 0;
byte[] baChunk = new byte[1024];
int size = 0;
while ( -1 != (len = input.read(baChunk)) )
{
db.write(baChunk, 0, len);
size += len;
}
baResult = db.toArray();
mapimages = Bitmap.createBitmapFromBytes(baResult,0,size,1);
....
public void paint(Graphics g)
{
g.drawBitmap(0,0,128,128,mapimages,0,0);
} I test on simulator + MDS is OK
but on real device image is not display
When I place star.png file on server 32 bit is OK, image is display.
please help me?