Package org.openntf.domino

Examples of org.openntf.domino.Stream.writeText()


    Stream str = null;
    try {
      fAux = File.createTempFile("ntfdom", "aux.tmp");
      str = sess.createStream();
      str.open(fAux.getPath(), "LMBCS");
      str.writeText(whose);
      payload = str.getBytes();

    } finally {
      if (str != null)
        str.close();
View Full Code Here


      //create plain text part
      if (getText().size() > 0) {
        mimeEntity = mimeRootChild.createChildEntity();
        stream = currSess.createStream();
        stream.writeText(join(getText(), System.getProperty("line.separator")));
        mimeEntity.setContentFromText(stream, "text/plain; charset=\"UTF-8\"", MIMEEntity.ENC_NONE);
        stream.close();
      }

      //create HTML part
View Full Code Here

      //create HTML part
      if (contentsHTML_.size() > 0) {
        mimeEntity = mimeRootChild.createChildEntity();
        stream = currSess.createStream();
        stream.writeText(join(contentsHTML_, System.getProperty("line.separator")));
        mimeEntity.setContentFromText(stream, "text/html; charset=\"UTF-8\"", MIMEEntity.ENC_NONE);
        stream.close();
      }

      //create embedded JSON part
View Full Code Here

      //create embedded JSON part
      if (StringUtil.isEmpty(getJSON())) {
        mimeEntity = mimeRootChild.createChildEntity();
        stream = currSess.createStream();
        String json = "{\"url\" : \"" + getJSON() + "\"}" + System.getProperty("line.separator");
        stream.writeText(json);
        mimeEntity.setContentFromText(stream, "application/embed+json; charset=\"UTF-8\"", MIMEEntity.ENC_NONE);
        stream.close();
      }

      // Add any attachments
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.