*/ public static String encodeToBase64ByteArrayString(File src) throws IOException{ byte[] b = new byte[(int)src.length()]; FileInputStream fis =null; try { fis = new FileInputStream(src); fis.read(b); } catch (IOException e) { throw e; } finally{ fis.close(); } //encode String return Base64.encodeBase64(b).toString(); } /** * @param inputStream * @param tmpFile