File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Implementing Vcard2.1 parser in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Implementing Vcard2.1 parser in Java" Watch "Implementing Vcard2.1 parser in Java" New topic

Implementing Vcard2.1 parser in Java

Monu Tripathi

Joined: Oct 12, 2008
Posts: 1369

We are trying to parse data received in vCard2.1 format and populate several value objects which are later written to relational database. The vCard data is received as a single long string and to fetch values of different fields we are performing a String#split() operation.
It is observed that lot of GC cycles happen during this time and we were wondering if instead of split(), we could use something else. Like Java's Scanner API.


1. Will replacing split() calls with Scanner APIs reduce the number of objects created on heap?
2. Can regex be an option worth considering here?


[List of FAQs] | [Android FAQ] | [Samuh Varta]
It is sorta covered in the JavaRanch Style Guide.
subject: Implementing Vcard2.1 parser in Java
It's not a secret anymore!