Package com.findwise.hydra.local

Examples of com.findwise.hydra.local.RemotePipeline.saveFile()


    RemotePipeline rp = new HttpRemotePipeline("localhost", server.getPort(), "stage");
   
    String content = "adsafgoaiuhgahgo\ndasdas";
    String fileName = "test.txt";
   
    rp.saveFile(new DocumentFile<Local>(testDoc.getID().getLocalDocumentID(), fileName, IOUtils.toInputStream(content, "UTF-8")));
   
    DocumentFile<MemoryType> df = mc.getDocumentReader().getDocumentFile(testDoc, fileName);
   
    if(df==null) {
      fail("File was not properly saved");
View Full Code Here


      File f = getFile();
      FileInputStream fis = new FileInputStream(f);
      DocumentFile<Local> df = new DocumentFile<Local>(ld.getID(), f.getName(), fis);
      df.setEncoding(new InputStreamReader(df.getStream()).getEncoding());
      df.setMimetype("application/msword");
      rp2.saveFile(df);
    }
  }
 
  public File getFile() throws URISyntaxException {
    URL path = ClassLoader.getSystemResource("goodapi.doc");
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.