BrowserField browserField = (BrowserField) BBMPlatformExtension._browserField.get();
final BrowserFieldConfig bfConfig = browserField.getConfig();
final BrowserFieldController bfController =
(BrowserFieldController) bfConfig.getProperty(BrowserFieldConfig.CONTROLLER);
InputConnection ic = null;
DataInputStream is = null;
try {
final BrowserFieldRequest bfReq = new BrowserFieldRequest(uri);
ic = bfController.handleResourceRequest(bfReq);
is = ic.openDataInputStream();
final ByteVector bmpBytes = new ByteVector();
try {
while(true) {
bmpBytes.addElement(is.readByte());
}
} catch(EOFException e) {
}
return bmpBytes.getArray();
} finally {
try {
ic.close();
} catch(Exception e) { }
try {
is.close();
} catch(Exception e) { }