public final class NullSafe
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
cancel(AsyncTask cancellable) |
static void |
close(java.lang.AutoCloseable c)
Null-safe close of a Closeable object
|
static void |
close(java.io.Closeable c)
Null-safe close of a Closeable object
|
static void |
close(java.sql.Connection dbConn)
Null-safe close of a connection
|
static void |
close(java.sql.ResultSet rs)
Null-safe close of a result set
|
static void |
close(java.sql.ResultSet rs,
java.sql.Statement stmt)
Null-safe close of both a result set and a statement
|
static void |
close(java.util.Scanner scanner)
Null-safe close of a Scanner
|
static void |
close(java.net.ServerSocket socket)
Null-safe close of a socket
|
static void |
close(java.net.Socket socket)
Null-safe close of a socket
|
static void |
close(java.sql.Statement stmt)
Null-safe close of a statement
|
static void |
close(java.util.zip.ZipFile zipFile)
Null-safe close of a zip-file
|
static int |
sizeOf(byte[] array)
Null-safe return of the array size.
|
static int |
sizeOf(java.util.Collection list)
Null-safe return of the list size.
|
static int |
sizeOf(double[] array)
Null-safe return of the array size.
|
static int |
sizeOf(int[] array)
Null-safe return of the array size.
|
static int |
sizeOf(java.util.Map map)
Null-safe return of the map size.
|
static int |
sizeOf(java.lang.Object[] array)
Null-safe return of the array size.
|
static int |
sizeOf(java.lang.String s)
Null-safe return of the string size.
|
public static void cancel(AsyncTask cancellable)
public static void close(java.io.Closeable c)
public static void close(java.lang.AutoCloseable c)
public static void close(java.util.zip.ZipFile zipFile)
public static void close(java.net.ServerSocket socket)
public static void close(java.net.Socket socket)
public static void close(java.util.Scanner scanner)
public static void close(java.sql.Connection dbConn)
public static void close(java.sql.ResultSet rs, java.sql.Statement stmt)
public static void close(java.sql.Statement stmt)
public static void close(java.sql.ResultSet rs)
public static int sizeOf(byte[] array)
public static int sizeOf(int[] array)
public static int sizeOf(double[] array)
public static int sizeOf(java.lang.Object[] array)
public static int sizeOf(java.util.Collection list)
public static int sizeOf(java.util.Map map)
public static int sizeOf(java.lang.String s)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.