FileDocCategorySizeDatePackage
PIMFormat.javaAPI DocphoneME MR2 API (J2ME)2943Wed May 02 18:00:28 BST 2007com.sun.kvem.midp.pim

PIMFormat

public interface PIMFormat
Interface for PIM data encoders and decoders.

Fields Summary
Constructors Summary
Methods Summary
public javax.microedition.pim.PIMItem[]decode(java.io.InputStream in, java.lang.String encoding, javax.microedition.pim.PIMList list)
Constructs one or more PIMItems from serialized data.

param
in Stream containing serialized data
param
encoding Character encoding of the stream
param
list PIMList to which items should be added, or null if the items should not be part of a list
return
a non-empty array of PIMItems containing the objects described in the serialized data, or null if no items are available
throws
UnsupportedPIMFormatException if the serialized data cannot be interpreted by this encoding.
throws
IOException if an error occurs while reading

public voidencode(java.io.OutputStream out, java.lang.String encoding, javax.microedition.pim.PIMItem pimItem)
Serializes a PIMItem.

param
out Stream to which serialized data is written
param
encoding Character encoding to use for serialized data
param
pimItem The item to write to the stream
throws
IOException if an error occurs while writing

public java.lang.StringgetName()
Gets the code name of this encoding (e.g. "VCARD/2.1").

return
the encoding name

public booleanisTypeSupported(int pimListType)
Checks to see if a given PIM list type is supported by this encoding.

param
pimListType int representing the PIM list type to check
return
true if the type can be read and written by this encoding, false otherwise