uk.ac.roe.antigen.ant
Class BuildGrabber

java.lang.Object
  extended byuk.ac.roe.antigen.ant.BuildGrabber

public class BuildGrabber
extends java.lang.Object

Grabs a directory, or a zip file, and installs it in the temp directory for processing

Author:
jdt

Constructor Summary
BuildGrabber()
          Set up temp directories etc
BuildGrabber(java.io.File dir)
          Set up temp directories etc User-supplied tmpdirectory
 
Method Summary
 boolean deleteTmp()
          On the off chance that the system doesn't delete it, you can try to delete it yourself
 CopyableFile grab(java.io.File dir)
          Source files are supplied as a known directory
 CopyableFile grab(java.util.jar.JarFile jar)
          Grab the contents of a jar file and unzip to a temp directory
 CopyableFile grab(java.lang.String path)
          Grabs stuff off the classpath and stick it in the temp directory
 CopyableFile grab(java.net.URL url)
          Grabs contents of a jar file from a URL and unzip to a temp directory
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildGrabber

public BuildGrabber()
             throws java.io.IOException
Set up temp directories etc

Throws:
java.io.IOException

BuildGrabber

public BuildGrabber(java.io.File dir)
             throws java.io.IOException
Set up temp directories etc User-supplied tmpdirectory

Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

grab

public CopyableFile grab(java.io.File dir)
                  throws java.io.IOException
Source files are supplied as a known directory

Parameters:
dir -
Returns:
the tmp directory holding the files
Throws:
java.io.IOException

grab

public CopyableFile grab(java.net.URL url)
                  throws java.io.IOException
Grabs contents of a jar file from a URL and unzip to a temp directory

Parameters:
url - of jar file
Returns:
the tmp directory holding the files
Throws:
java.io.IOException

grab

public CopyableFile grab(java.util.jar.JarFile jar)
                  throws java.io.IOException
Grab the contents of a jar file and unzip to a temp directory

Parameters:
jar - the jar file
Returns:
the tmp directory holding the files
Throws:
java.io.IOException

grab

public CopyableFile grab(java.lang.String path)
                  throws java.io.IOException
Grabs stuff off the classpath and stick it in the temp directory

Parameters:
path - the path off the classpath to the jar
Returns:
the temp directory in which the grabbed stuff has been stuck
Throws:
java.io.IOException

deleteTmp

public boolean deleteTmp()
On the off chance that the system doesn't delete it, you can try to delete it yourself

Returns:
true or false depending on success


Copyright © 2005 Institute for Astronomy, Royal Observatory of Edinburgh. All Rights Reserved.