Class DefaultIndexUpdater.FileFetcher

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File basedir  
    • Constructor Summary

      Constructors 
      Constructor Description
      FileFetcher​(java.io.File basedir)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void connect​(java.lang.String id, java.lang.String url)
      Connect and start transfer session
      void disconnect()
      Disconnect and complete transfer session
      private java.io.File getFile​(java.lang.String name)  
      java.io.InputStream retrieve​(java.lang.String name)
      Retrieves resource as InputStream
      void retrieve​(java.lang.String name, java.io.File targetFile)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • basedir

        private final java.io.File basedir
    • Constructor Detail

      • FileFetcher

        public FileFetcher​(java.io.File basedir)
    • Method Detail

      • connect

        public void connect​(java.lang.String id,
                            java.lang.String url)
                     throws java.io.IOException
        Description copied from interface: ResourceFetcher
        Connect and start transfer session
        Specified by:
        connect in interface ResourceFetcher
        Throws:
        java.io.IOException
      • disconnect

        public void disconnect()
                        throws java.io.IOException
        Description copied from interface: ResourceFetcher
        Disconnect and complete transfer session
        Specified by:
        disconnect in interface ResourceFetcher
        Throws:
        java.io.IOException
      • retrieve

        public void retrieve​(java.lang.String name,
                             java.io.File targetFile)
                      throws java.io.IOException,
                             java.io.FileNotFoundException
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
      • retrieve

        public java.io.InputStream retrieve​(java.lang.String name)
                                     throws java.io.IOException,
                                            java.io.FileNotFoundException
        Description copied from interface: ResourceFetcher
        Retrieves resource as InputStream
        Specified by:
        retrieve in interface ResourceFetcher
        Parameters:
        name - a name of resource to retrieve
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
      • getFile

        private java.io.File getFile​(java.lang.String name)