Class SegmentFetcherFactory


  • public class SegmentFetcherFactory
    extends Object
    • Method Detail

      • fetchSegmentToLocal

        public static void fetchSegmentToLocal​(URI uri,
                                               File dest)
                                        throws Exception
        Fetches a segment from URI location to local.
        Throws:
        Exception
      • fetchSegmentToLocal

        public static void fetchSegmentToLocal​(String uri,
                                               File dest)
                                        throws Exception
        Fetches a segment from URI location to local.
        Throws:
        Exception
      • fetchAndStreamUntarToLocal

        public static File fetchAndStreamUntarToLocal​(String uri,
                                                      File tempRootDir,
                                                      long maxStreamRateInByte)
                                               throws Exception
        Fetches a segment from URI location to local and untar it in a streamed manner.
        Parameters:
        uri - URI
        tempRootDir - Tmp dir to download
        maxStreamRateInByte - limit the rate to write download-untar stream to disk, in bytes -1 for no disk write limit, 0 for limit the writing to min(untar, download) rate
        Returns:
        the untared directory
        Throws:
        Exception
      • fetchAndDecryptSegmentToLocal

        public static void fetchAndDecryptSegmentToLocal​(String uri,
                                                         File dest,
                                                         String crypterName)
                                                  throws Exception
        Fetches a segment from a URI location to a local file and decrypts it if needed
        Parameters:
        uri - remote segment location
        dest - local file
        Throws:
        Exception