일단 전송하고싶은 데이터를 파일로 만드시고 input/output stream을 생성하는 방법도 있습니다.
inputstream의 종류는 여러개가 있으니 쓰고싶은걸로 바꿔서 쓰셔도 무방합니다.
사용하실때는 쓰레드를 이용하셔야 합니다.
File imagefile = new File(image);
FileInputStream fis = null;
try {
fis = new FileInputStream(imagefile);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Bitmap bm = BitmapFactory.decodeStream(fis);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.PNG, 100 , baos);
byte[] b = baos.toByteArray();