LocalFileTransferAsyncHandler (The Data Transfer Agent Service 2.1.0-3.3.0 API)
Date: 2014-07-19

org.gcube.datatransfer.agent.impl.handlers

## Class LocalFileTransferAsyncHandler

- java.lang.Object
- - org.gcube.datatransfer.agent.impl.handlers.TransferHandler
  - - org.gcube.datatransfer.agent.impl.handlers.LocalFileTransferAsyncHandler

- All Implemented Interfaces:
    Runnable

      public class LocalFileTransferAsyncHandler
      extends TransferHandler

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `bufferSize`

    - ### Fields inherited from class org.gcube.datatransfer.agent.impl.handlers.TransferHandler

      `destData, endIndex, errorHappened, inputFiles, logger, outPath, startIndex, timeout, transferId, transferType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalFileTransferAsyncHandler(String[] inputFiles, String outPath, String transferId, org.gcube.datatransfer.agent.stubs.datatransferagent.TransferType type, org.gcube.datatransfer.agent.stubs.datatransferagent.DestData data, int startIndex, int endIndex)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkAvailableSize(long size)`
    `static long` | `copyLarge(InputStream input, OutputStream output)`
    `static void` | `copyWithHttpClient(String inputURI, String outPutUri)`
    `void` | `run()`

    - ### Methods inherited from class org.gcube.datatransfer.agent.impl.handlers.TransferHandler

      `getTransferObjList, isErrorHappened, setTransferObj`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### bufferSize

          public static int bufferSize

  - ### Constructor Detail

    - #### LocalFileTransferAsyncHandler

          public LocalFileTransferAsyncHandler(String[] inputFiles,
                                       String outPath,
                                       String transferId,
                                       org.gcube.datatransfer.agent.stubs.datatransferagent.TransferType type,
                                       org.gcube.datatransfer.agent.stubs.datatransferagent.DestData data,
                                       int startIndex,
                                       int endIndex)

  - ### Method Detail

    - #### run

          public void run()

    - #### checkAvailableSize

          public boolean checkAvailableSize(long size)

    - #### copyLarge

          public static long copyLarge(InputStream input,
                       OutputStream output)
                                throws IOException

      Throws:
        `IOException`

    - #### copyWithHttpClient

          public static void copyWithHttpClient(String inputURI,
                                String outPutUri)
                                         throws Exception

      Throws:
        `Exception`

Copyright © 2014. All Rights Reserved.