/android/export-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/export-contacts

« back to all changes in this revision

Viewing changes to src/am/ed/exportcontacts/VcardExporter.java

  • Committer: Tim Marston
  • Date: 2013-03-04 16:29:21 UTC
  • Revision ID: tim@ed.am-20130304162921-0b456wmqs00zrjp2
corrected typo

Show diffs side-by-side

added added

removed removed

1
1
/*
2
2
 * Exporter.java
3
3
 *
4
 
 * Copyright (C) 2011 to 2013 Tim Marston <tim@ed.am>
 
4
 * Copyright (C) 2011 to 2012 Tim Marston <tim@ed.am>
5
5
 *
6
6
 * This file is part of the Export Contacts program (hereafter referred
7
 
 * to as "this program").  For more information, see
 
7
 * to as "this program"). For more information, see
8
8
 * http://ed.am/dev/android/export-contacts
9
9
 *
10
10
 * This program is free software: you can redistribute it and/or modify
36
36
public class VcardExporter extends Exporter
37
37
{
38
38
        protected FileOutputStream _ostream = null;
39
 
        protected boolean _first_contact = true;
40
39
 
41
40
        public VcardExporter( Doit doit )
42
41
        {
164
163
                return buffer.toString();
165
164
        }
166
165
 
 
166
 
167
167
        @Override
168
168
        protected boolean exportContact( ContactData contact )
169
169
                throws AbortExportException
174
174
                if( contact.getPrimaryIdentifier() == null )
175
175
                        return false;
176
176
 
177
 
                // append newline
178
 
                if( _first_contact )
179
 
                        _first_contact = false;
180
 
                else
181
 
                        out.append( "\n" );
182
 
 
183
177
                // append header
184
178
                out.append( "BEGIN:VCARD\n" );
185
179
                out.append( "VERSION:3.0\n" );