com.android.sdklib.build
Class JarListSanitizer
java.lang.Object
com.android.sdklib.build.JarListSanitizer
public class JarListSanitizer
- extends java.lang.Object
A Class to handle a list of jar files, finding and removing duplicates.
Right now duplicates are based on:
- same filename
- same length
- same content: using sha1 comparison.
The length/sha1 are kept in a cache and only updated if the library is changed.
Method Summary |
java.util.List<java.io.File> |
sanitize(java.util.Collection<java.io.File> files)
Sanitize a given list of files |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JarListSanitizer
public JarListSanitizer(java.io.File out)
- Creates a sanitizer.
- Parameters:
out
- the project output where the cache is to be stored.
JarListSanitizer
public JarListSanitizer(java.io.File out,
java.io.PrintStream outStream)
sanitize
public java.util.List<java.io.File> sanitize(java.util.Collection<java.io.File> files)
throws JarListSanitizer.DifferentLibException,
JarListSanitizer.Sha1Exception
- Sanitize a given list of files
- Parameters:
files
- the list to sanitize
- Returns:
- a new list containing no duplicates.
- Throws:
JarListSanitizer.DifferentLibException
JarListSanitizer.Sha1Exception