Package de.ddb.conversion.ssh

Examples of de.ddb.conversion.ssh.RemoteExec


 
  private RemoteExec getRemoteExec()
  {
    if(this.remoteExec == null)
    {
      this.remoteExec = new RemoteExec();
      this.remoteExec.setCommand(this.command);
      this.remoteExec.setEnvironmentProperties(getEnvironmentProperties());
      this.remoteExec.setHost(getConverterContext().getProperties().getProperty(BinaryConverter.PROPKEY_HOST));
      this.remoteExec.setUser(getConverterContext().getProperties().getProperty(BinaryConverter.PROPKEY_USER));
      this.remoteExec.setPassword(getConverterContext().getProperties().getProperty(BinaryConverter.PROPKEY_PASSWORD));
View Full Code Here


   
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("LD_LIBRARY_PATH", "/pica/sybase/lib");
    properties.put("FILEMAP", "/pica/tolk/confdir/FILEMAP");
   
    RemoteExec remoteExec = new RemoteExec();
    remoteExec.setCommand(command);
    remoteExec.setHost("merkur.d-nb.de");
    remoteExec.setUser("tolk");
    remoteExec.setPassword("hads%szl");
    remoteExec.setEnvironmentProperties(properties);

    InputStream in = new FileInputStream("test/input/02499250X.pp");
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    int i;
    while ((i = in.read()) != -1) {
      buffer.write(i);
    }
    byte[] ret = remoteExec.remoteExec(buffer.toByteArray());
    logger.info("output: " + new String(ret));
  }
View Full Code Here

   
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("LD_LIBRARY_PATH", "/pica/sybase/lib");
    properties.put("FILEMAP", "/pica/tolk/confdir/FILEMAP");

    RemoteExec remoteExec = new RemoteExec();

    remoteExec.setCommand(command);
    remoteExec.setHost("merkur.d-nb.de");
    remoteExec.setUser("tolk");
    remoteExec.setPassword("hads%szl");
    remoteExec.setEnvironmentProperties(properties);
    StringWriter writer = new StringWriter();
    Reader reader = new BufferedReader(new InputStreamReader(
        new FileInputStream("test/input/02499250X.pp"),
        new PicaCharset()));
    // StringBuffer buffer = new StringBuffer();
    // int i;
    // while((i=reader.read())!=-1) {
    // buffer.append((char)i);
    // }
    // buffer.append("\n");
    // StringReader reader2 = new StringReader(buffer.toString());
    remoteExec.remoteExec(reader, writer, new PicaCharset(), Charset
        .forName("UTF-8"), null, null);

    logger.info("output2: " + writer.toString());
  }
View Full Code Here

TOP

Related Classes of de.ddb.conversion.ssh.RemoteExec

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.