net.wimpi.pim.contact.io.vcard
Class vCardUnmarshaller

java.lang.Object
  |
  +--net.wimpi.pim.contact.io.vcard.vCardUnmarshaller
All Implemented Interfaces:
ContactUnmarshaller

public class vCardUnmarshaller
extends java.lang.Object
implements ContactUnmarshaller

Class implementing a ContactUnmarshaller for the vCard Mime Directory format specification (see RFC 2426).

Version:
0.1 (22/07/2003)
Author:
Dieter Wimberger

Constructor Summary
vCardUnmarshaller()
           
vCardUnmarshaller(java.lang.String enc)
           
 
Method Summary
 java.lang.String getEncoding()
           
 boolean isStrict()
          Tests if this ContactUnmarshaller flag for strict mode is set.
static void main(java.lang.String[] args)
           
 void setEncoding(java.lang.String encoding)
          Sets the encoding used by this ContactUnmarshaller.
 void setStrict(boolean b)
          Sets the strict flag for the unmarshalling mechanism.
 Contact unmarshallContact(java.io.InputStream in)
          Unmarshalls a contact from the given InpuStream.
 Contact[] unmarshallContacts(java.io.InputStream in)
          Unmarshalls a group of contacts from the given InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

vCardUnmarshaller

public vCardUnmarshaller()

vCardUnmarshaller

public vCardUnmarshaller(java.lang.String enc)
Method Detail

getEncoding

public java.lang.String getEncoding()

setEncoding

public void setEncoding(java.lang.String encoding)
Description copied from interface: ContactUnmarshaller
Sets the encoding used by this ContactUnmarshaller.

Specified by:
setEncoding in interface ContactUnmarshaller
Parameters:
encoding - the encoding as String.

unmarshallContact

public Contact unmarshallContact(java.io.InputStream in)
Description copied from interface: ContactUnmarshaller
Unmarshalls a contact from the given InpuStream.

Specified by:
unmarshallContact in interface ContactUnmarshaller
Parameters:
in - the InputStream to read from.

unmarshallContacts

public Contact[] unmarshallContacts(java.io.InputStream in)
Description copied from interface: ContactUnmarshaller
Unmarshalls a group of contacts from the given InputStream.

Specified by:
unmarshallContacts in interface ContactUnmarshaller
Parameters:
in - the InputStream to read from.

setStrict

public void setStrict(boolean b)
Description copied from interface: ContactUnmarshaller
Sets the strict flag for the unmarshalling mechanism.

If this flag is set, then the unmarshalling should fail for input data that does not comply to the specfication. If it is not set, then the implementation should make efforts to recover at least all parts that comply to the standard.

Note that the default setting for this flag is supposed to be true.

Specified by:
setStrict in interface ContactUnmarshaller
Parameters:
b - true for setting the flag, false otherwise.

isStrict

public boolean isStrict()
Description copied from interface: ContactUnmarshaller
Tests if this ContactUnmarshaller flag for strict mode is set.

Specified by:
isStrict in interface ContactUnmarshaller
Returns:
true if flag for strict set, false otherwise.

main

public static void main(java.lang.String[] args)


Copyright © 2001-2003 jpim team.