public final class IOUtils extends Object
| Modifier and Type | Method and Description | 
|---|---|
static byte[] | 
base64ToBytes(String base64)
Converts the Base64 (RFC 2045) String into a byte array. 
 | 
static void | 
close(Closeable closeable)
Closes the  
Closeable and logs any error. | 
static void | 
close(Closeable closeable,
     Level level,
     String message)
Closes the  
Closeable and logs any error. | 
static byte[] | 
hexToBytes(String hex)
Converts the hex string to bytes. 
 | 
static String | 
toBase64(byte[] bytes)
Converts the byte array into a Base64 (RFC 2045) string. 
 | 
static String | 
toHex(byte[] bytes)
Converts the byte array into a HEX string. 
 | 
public static byte[] base64ToBytes(String base64)
base64 - The Base64 string to convert.public static void close(Closeable closeable)
Closeable and logs any error.closeable - The connection to close.public static void close(Closeable closeable, Level level, String message)
Closeable and logs any error.closeable - The connection to close.level - The level to log on a failure.message - The message to log on a failure.public static byte[] hexToBytes(String hex)
hex - The HEX string to convert.public static String toBase64(byte[] bytes)
bytes - The bytes to convert.public static String toHex(byte[] bytes)
bytes - The bytes to convert.Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.