Package com.knowgate.dfs

Examples of com.knowgate.dfs.ByteArrayDataSource


      MimeBodyPart oAttachment = new MimeBodyPart();
      oAttachment.setDisposition("attachment");
      oAttachment.setFileName(oFile.getName());
      oAttachment.setHeader("Content-Transfer-Encoding", "base64");

      ByteArrayDataSource oDataSrc;
      try {
        oDataSrc = new ByteArrayDataSource(oFS.readfilebin(sFilePath), "application/octet-stream");
      } catch (com.enterprisedt.net.ftp.FTPException ftpe) {
      throw new IOException(ftpe.getMessage());
      }
      oAttachment.setDataHandler(new DataHandler(oDataSrc));
      oSentMsgParts.addBodyPart(oAttachment);
View Full Code Here


          FileSystem oFS = new FileSystem();
          byte[] byData = oFS.readfilebin(sFilePath);
          String sContentType = oRSet.getString(7);
          if (DebugFile.trace) DebugFile.writeln("new ByteArrayDataSource("+sFilePath+", "+sContentType+")");
          ByteArrayDataSource baDataSrc = new ByteArrayDataSource(byData, sContentType);

          oMimeBody = new MimeBodyPart();
          oMimeBody.setDataHandler(new DataHandler(baDataSrc));
        }
        else if (id_disposition.equals("pointer")) {
View Full Code Here

        new StreamPipe().between(oInStrm, oByStrm);
        oInStrm.close();

        if (DebugFile.trace) DebugFile.writeln("part " + String.valueOf(p) + " size is " + String.valueOf(oByStrm.size()));

        ByteArrayDataSource oDataSrc = new ByteArrayDataSource(oByStrm.toByteArray(), oPart.getContentType());
        MimeBodyPart oAttachment = new MimeBodyPart();
        oAttachment.setDisposition(sDisposition);
        if (sDisposition.equals("attachment"))
        if (null==oPart.getDescription())
          oAttachment.setFileName(oPart.getFileName());
View Full Code Here

      MimeBodyPart oAttachment = new MimeBodyPart();
      oAttachment.setDisposition("attachment");
      oAttachment.setFileName(oFile.getName());
      oAttachment.setHeader("Content-Transfer-Encoding", "base64");

      ByteArrayDataSource oDataSrc;
      try {
        oDataSrc = new ByteArrayDataSource(oFS.readfilebin(sFilePath), "application/octet-stream");
      } catch (com.enterprisedt.net.ftp.FTPException ftpe) {
      throw new IOException(ftpe.getMessage());
      }
      oAttachment.setDataHandler(new DataHandler(oDataSrc));
      oSentMsgParts.addBodyPart(oAttachment);
View Full Code Here

TOP

Related Classes of com.knowgate.dfs.ByteArrayDataSource

Copyright © 2018 www.massapicom. 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.