JAVA/CORBA CLASSES
import lotus.domino.*; public class JavaAgent extends AgentBase { public void NotesMain() { try { Session session = getSession(); AgentContext agentContext = session.getAgentContext(); // (Your code goes here) DocumentCollection dc = agentContext.getUnprocessedDocuments(); Document doc = dc.getFirstDocument(); // Create stream and write text of Body item to it Stream stream = session.createStream(); stream.writeText(doc.getItemValueString("Body")); // Reset position to beginning and read text stream.setPosition(0); System.out.println(stream.readText()); } catch(NotesException e) { e.printStackTrace(); } catch(Exception e) { e.printStackTrace(); } } }
See Also