StringBuffer strB = new StringBuffer();
byte x;
FileInputStream fis = new FileInputStream(filename);
while((x = (byte)fis.read()) != -1) {
strB.append(Integer.toHexString(x));
}
String BitmapData = strB.toString();