/** * Set the avatar for the VCard by specifying the url to the image. * * @param avatarURL the url to the image(png,jpeg,gif,bmp) */ public void setAvatar(URL avatarURL) { byte[] bytes = new byte[0]; try { bytes = getBytes(avatarURL); } catch (IOException e) { e.printStackTrace(); } setAvatar(bytes); }
/** * Set the avatar for the VCard by specifying the url to the image. * * @param avatarURL the url to the image(png,jpeg,gif,bmp) */ public void setAvatar(URL avatarURL) { byte[] bytes = new byte[0]; try { bytes = getBytes(avatarURL); } catch (IOException e) { e.printStackTrace(); } setAvatar(bytes); }
/** * Set the avatar for the VCard by specifying the url to the image. * * @param avatarURL the url to the image(png,jpeg,gif,bmp) */ public void setAvatar(URL avatarURL) { byte[] bytes = new byte[0]; try { bytes = getBytes(avatarURL); } catch (IOException e) { e.printStackTrace(); } setAvatar(bytes); }
/** * Set the avatar for the VCard by specifying the url to the image. * * @param avatarURL the url to the image(png,jpeg,gif,bmp) */ public void setAvatar(URL avatarURL) { byte[] bytes = new byte[0]; try { bytes = getBytes(avatarURL); } catch (IOException e) { e.printStackTrace(); } String encodedImage = StringUtils.encodeBase64(bytes); avatar = encodedImage; setField("PHOTO", "<TYPE>image/jpeg</TYPE><BINVAL>" + encodedImage + "</BINVAL>"); }