public  String GetImageStr(String imgFilePath) {
 // 将图片文件转化为字节数组字符串,并对其进行Base64编码处理       
 byte[] data = null; // 读取图片字节数组       
 try {        
 URL url = new URL(imgFilePath);
 URLConnection urlConnection = url.openConnection();
 InputStream in1 = urlConnection.getInputStream(); 
 data = new byte[in1.available()];  //问题可能出现在此行            in1.read(data);  
 in1.close();   
 } catch (IOException e) {     
 e.printStackTrace();        
 }             
 // 对字节数组Base64编码     
 BASE64Encoder encoder = new BASE64Encoder();   
 return encoder.encode(data);
 // 返回Base64编码过的字节数组字符串    }
 }
imgFilePath 传入的参数例:ftp://用户名:密码@IP地址/图片路径.jpg问题1:大量图片地址用FOR循环直行此语句时获得的结果为空。
问题2:把结果转换成照片无法显示完整。
补充:照片大小不同。