Examples of InputStreamCallback


Examples of org.dbcooper.io.InputStreamCallback

   * Creates and returns a data set from the given resource.
   * @param resource The resource containing the data set.
   * @return A data set.
   */
  public IDataSet loadDataSet(Resource resource) {
    return (IDataSet) new InputStreamTemplate(resource).execute(new InputStreamCallback() {
      public IDataSet doInInputStream(InputStream inputStream) throws IOException {
        try {
          return dataSetLoader.load(inputStream);
        }
        catch (DataSetException ex) {
View Full Code Here

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

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

        "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
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.