JAVA/CORBA CLASSES


Examples: replaceItemValueCustomDataBytes method
This agent creates or replaces an item in the current document and assigns it the value of a byte array.

import lotus.domino.*;
import java.io.*;

public class JavaAgent extends AgentBase {

 public void NotesMain() {

   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();

     // (Your code goes here)
     
     // Create byte array
     byte[] bytes = new byte[10];
     for (int i = 0; i < 10; i++)
       bytes[i] = (byte) (i + 48);

     // Store custom data as item
     Document doc = agentContext.getDocumentContext();
     doc.replaceItemValueCustomDataBytes
     ("TenBytesItem", "TenBytesType", bytes);
     doc.save();

   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also