Package edu.umd.cs.findbugs.util
Class Util
java.lang.Object
edu.umd.cs.findbugs.util.Util
- Author:
- William Pugh
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K> List<K>
static <K> Set<K>
static void
closeSilently
(Closeable out) Deprecated.Use try-with-resources instead.static void
static void
Deprecated.Use try-with-resources instead.static void
closeSilently
(Reader in) Deprecated.Use try-with-resources instead.static void
closeSilently
(ZipFile zip) Deprecated.Use try-with-resources instead.static <T> Set<T>
static <E> E
static String
static String
static Reader
getFileReader
(File filename) static Reader
getFileReader
(String filename) static Writer
getFileWriter
(String filename) static MessageDigest
static Reader
getReader
(InputStream in) static Writer
getWriter
(OutputStream out) static String
static <K,
V> Map<K, V> immutableMap
(Map<K, V> map) static boolean
isPowerOfTwo
(int i) static <K> ArrayList<K>
makeSmallArrayList
(List<K> m) static <K,
V> HashMap<K, V> makeSmallHashMap
(Map<K, V> m) static <K> HashSet<K>
makeSmallHashSet
(Collection<K> m) static String
static Thread
static Thread
runInDameonThread
(Runnable r, String name) static void
static Thread
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
startDameonThread
-
runInDameonThread
-
runInDameonThread
-
repeat
-
runLogAtShutdown
-
emptyOrNonnullSingleton
-
immutableMap
-
getReader
-
getFileReader
- Throws:
FileNotFoundException
-
getFileReader
- Throws:
FileNotFoundException
-
getWriter
-
getFileWriter
- Throws:
FileNotFoundException
-
closeSilently
-
closeSilently
Deprecated.Use try-with-resources instead. -
closeSilently
Deprecated.Use try-with-resources instead. And basicallyIOException
fromOutputStream.close()
is not good to ignore. -
closeSilently
Deprecated.Use try-with-resources instead. And basicallyIOException
fromOutputStream.close()
is not good to ignore. -
closeSilently
Deprecated.Use try-with-resources instead. -
getXMLType
- Throws:
IOException
-
getFileExtension
-
getFileExtensionIgnoringGz
-
first
- Parameters:
i
- the Iterable whose first element is to be retrieved- Returns:
- first element of iterable
-
makeSmallHashMap
-
makeSmallHashSet
-
makeSmallArrayList
-
addTo
-
addTo
-
getMD5Digest
-
isPowerOfTwo
public static boolean isPowerOfTwo(int i)
-