setValueCustomData (Item - Java)

Sets the value of an item to custom data from an object.

Note: This method is new with Release 6.

Defined in

Item

Syntax

public void setValueCustomData(Object userobj)
    throws NotesException
    throws java.io.IOException
public void setValueCustomData(String datatypename, Object userobj)
    throws NotesException
    throws java.io.IOException

Parameters

Object userobj

An object that contains the custom data. The class that defines this object must implement Serializable. If desired, you can override readObject and writeObject.

String datatypename

A name for the data type. When getting custom data, use this name for verification.

Usage

The new value replaces the existing value.

To keep the changes, you must call Document.save after calling setValueCustomData.

The custom data cannot exceed 64K.

If you intend to get the custom data through a language binding other than Java, use a "Bytes" method.

For methods that get custom data, see:

For other methods that write custom data to an item, see:

Example