Package com.knowgate.dfs

Examples of com.knowgate.dfs.StreamPipe.between()


       // Decode content as an ISO-8859-1 string
       if (DebugFile.trace) DebugFile.writeln("No data handler found for Content-Type, decoding as ISO-8859-1 string");
       InputStream oInStrm = (InputStream) oContent;
       ByteArrayOutputStream oBaStrm = new ByteArrayOutputStream();
       StreamPipe oPipe = new StreamPipe();
       oPipe.between(oInStrm, oBaStrm);
       oRetVal = new MimeBodyPart();
       oRetVal.setText(oBaStrm.toString("ISO8859_1"));
     }
     else {
       throw new MessagingException("Unparsed Mime Content " + oContent.getClass().getName());
View Full Code Here


      File oFile = oDBF.getFile();
      MboxFile oMBox = new MboxFile(oFile, MboxFile.READ_ONLY);

      InputStream oInStrm = oMBox.getMessageAsStream(oPos.longValue(), iLen);
      StreamPipe oPipe = new StreamPipe();
      oPipe.between(oInStrm, oOutStrm);
      oInStrm.close();
      oMBox.close();
    }
    else {
      Multipart oDBParts = getParts();
View Full Code Here

    Item item = getDocument().item();
    sItemName = Gadgets.removeChars(sItemName, "\"\\/?*:|<>;&");
    item.setName(sItemName);
    OutputStream outstrm = item.getOutputStream();
    StreamPipe pipe = new StreamPipe();
    pipe.between(instrm, outstrm);
    outstrm.close();
    Log.out.debug(getClass().getName()+".insertContentFromInputStream("+sItemName+")");
    DAO.log(oSes, getDocument(), getClass(), "INSERT ITEM", AtrilEvent.Level.INFO, sItemName);
  }
 
View Full Code Here

        String sFileName = oItm.name().toLowerCase();
        oPipe = new StreamPipe();
        ByteArrayOutputStream oByOut = new ByteArrayOutputStream();
        if (sFileName.endsWith(".pdf")) {
          Log.out.debug("Item.getInputStreamTranscodedToMime(image/jpeg)");
          oPipe.between(oItm.getInputStreamTranscodedToMime("image/jpeg"), oByOut);
        } else {
            Log.out.debug("Item.getInputStream()");
            oPipe.between(oItm.getInputStream(), oByOut);         
        }
        byte[] aBytes = oByOut.toByteArray();
View Full Code Here

        if (sFileName.endsWith(".pdf")) {
          Log.out.debug("Item.getInputStreamTranscodedToMime(image/jpeg)");
          oPipe.between(oItm.getInputStreamTranscodedToMime("image/jpeg"), oByOut);
        } else {
            Log.out.debug("Item.getInputStream()");
            oPipe.between(oItm.getInputStream(), oByOut);         
        }
        byte[] aBytes = oByOut.toByteArray();
        oByOut.close();
        oByOut = null;
        Log.out.debug("new Picture()");
View Full Code Here

        String sItemName = "th"+oDoc.id()+".jpg";
        oThi.setName(sItemName);
        oThi.mimeType("image/jpeg");
        OutputStream oOutStrm = oThi.getOutputStream();
        oPipe = new StreamPipe();
        oPipe.between(new ByteArrayInputStream(byThumb), oOutStrm);
        oThl.save("");
        oOutStrm.close();
        Log.out.debug("Thumbnail creation done");
        DAO.log(oSes, oThl, Class.forName("com.zesped.model."+oDoc.type().name()+"Thumbnail"), "INSERT THUMBNAIL", AtrilEvent.Level.INFO, sItemName);
        oSes.disconnect();
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.