I need a java library to read vcard files (vcf).
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Cardme seems to be the best vcard library around with active development and there is even a wiki site up.
Check the project homepage.
ez-vcard supports versions 2.1, 3.0, and 4.0 of the vCard standard, as well as XML-encoded vCards ("xCard" standard), HTML-encoded vCards ("hCard" microformat), and JSON-encoded vCards ("jCard" standard).
https://github.com/mangstadt/ez-vcard
To read a vCard file, use the
Ezvcard.parse()
method. Then, call the various getter methods on the returnedVCard
object to retrieve the vCard data fields.A search for Java and vcard yields quite a few results.
In particular there's the Mime-Dir-j which is no longer under active development, but may be all you need, and vcard4j which seems to have been dormant for even longer (last release 2003!).
Try Google, Yahoo, whatever and find http://vcard4j.sourceforge.net/
Well, just in case you want to use a mobile phone, JSR75 does it right out of the box:
javax.microedition.pim.PIM.fromSerialFormat is specified as supporting vCard 3.0
Haven't used it yet (about to try it out), but this looks promising.
http://code.google.com/p/android-vcard/