Package net.sourceforge.cardme.vcard

Examples of net.sourceforge.cardme.vcard.VCardImpl.addPhoto()


    photo1.setCompression(false);
    photo1.setEncodingType(EncodingType.BINARY);
    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);
View Full Code Here


    appyBasicName(vcard);
   
    PhotoType photo = new PhotoType();
    photo.setPhotoURI(new URI("http://www.google.com/intl/en_com/images/srpr/logo3w.png"));
    photo.setImageMediaType(ImageMediaType.PNG);
    vcard.addPhoto(photo);
    String result = getSerializedString(vcard);
   
    //Changed path to full URI as per http://www.ietf.org/rfc/rfc2426.txt, section 3.1.4
    assertTrue(result.contains("PHOTO;VALUE=URI:http://www.google.com/intl/en_com/images/srpr/logo3w.png"));
  }
View Full Code Here

    photo.setCompression(true);

    byte[] tuxPicture1 = Util.getFileAsBytes(new File("test/images/smallTux.png"));
    photo.setPhoto(tuxPicture1);
   
    vcard.addPhoto(photo);
    String result = getSerializedString(vcard);
    assertTrue(result.contains("PHOTO;ENCODING=BASE64;TYPE=PNG:"));
  }
 
  @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.