net.wimpi.pim.contact.io
Interface ContactUnmarshaller

All Known Implementing Classes:
vCardUnmarshaller

public interface ContactUnmarshaller

Interface modeling a ContactMarshaller.

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

Method Summary
 boolean isStrict()
          Tests if this ContactUnmarshaller flag for strict mode is set.
 void setEncoding(java.lang.String enc)
          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.
 

Method Detail

setEncoding

public void setEncoding(java.lang.String enc)
Sets the encoding used by this ContactUnmarshaller.

Parameters:
enc - the encoding as String.

unmarshallContact

public Contact unmarshallContact(java.io.InputStream in)
Unmarshalls a contact from the given InpuStream.

Parameters:
in - the InputStream to read from.

unmarshallContacts

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

Parameters:
in - the InputStream to read from.

setStrict

public void setStrict(boolean b)
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.

Parameters:
b - true for setting the flag, false otherwise.

isStrict

public boolean isStrict()
Tests if this ContactUnmarshaller flag for strict mode is set.

Returns:
true if flag for strict set, false otherwise.


Copyright © 2001-2003 jpim team.