Package net.sourceforge.cardme.vcard.types

Examples of net.sourceforge.cardme.vcard.types.LogoType


    photo1.setImageMediaType(ImageMediaType.PNG);
    byte[] tuxPicture1 = Util.getFileAsBytes(new File("test/images/smallTux.png"));
    photo1.setPhoto(tuxPicture1);
    vcard.addPhoto(photo1);
   
    LogoType logo = new LogoType();
    logo.setCompression(true);
    logo.setEncodingType(EncodingType.BINARY);
    logo.setImageMediaType(ImageMediaType.PNG);
    byte[] tuxPicture2 = Util.getFileAsBytes(new File("test/images/smallTux.png"));
    logo.setLogo(tuxPicture2);
    vcard.addLogo(logo);
   
    SoundType sound = new SoundType();
    sound.setCompression(false);
    sound.setEncodingType(EncodingType.BINARY);
View Full Code Here


   * @param vcard
   * @throws VCardParseException
   */
  private void parseLogoType(String group, String value, List<ParameterType> paramTypeList, VCardImpl vcard) throws VCardParseException {
    try {
      LogoType logoType = new LogoType();
      parseParamTypes(logoType, paramTypeList, value, VCardTypeName.LOGO);
     
      if(logoType.isBinary()) {
        byte[] logoBytes = Base64Wrapper.decode(value);
        logoType.setCompression(false);
        logoType.setLogo(logoBytes);
      }
      else {
        URI logoUri = new URI(value);
        logoType.setLogoURI(logoUri);
      }
     
      if(group != null) {
        logoType.setGroup(group);
      }
     
      vcard.addLogo(logoType);
    }
    catch(Exception ex) {
View Full Code Here

TOP

Related Classes of net.sourceforge.cardme.vcard.types.LogoType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.