Package org.springframework.integration.file.remote

Examples of org.springframework.integration.file.remote.InputStreamCallback


    @Override
    public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
      final String fileName = chunkContext.getStepContext().getStepExecution().getExecutionContext().getString(
          "filePath");
      Assert.notNull(fileName);
      boolean result = this.template.get(MessageBuilder.withPayload(fileName).build(), new InputStreamCallback() {

        @Override
        public void doWithInputStream(InputStream stream) throws IOException {
          // TODO hadoop
          FileOutputStream out = new FileOutputStream(new File(tmpDir,
View Full Code Here


        "filePath");
    Assert.notNull(filePath);
    if (logger.isDebugEnabled()) {
      logger.debug("Transferring " + filePath + " to HDFS");
    }
    boolean result = this.template.get(filePath, new InputStreamCallback() {

      @Override
      public void doWithInputStream(InputStream stream) throws IOException {
        OutputStreamWriter writer = new OutputStreamWriter(configuration,
            new Path(hdfsDirectory + filePath), null);
View Full Code Here

TOP

Related Classes of org.springframework.integration.file.remote.InputStreamCallback

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.