public class IOUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Charset |
DEFAULT_CHARSET |
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
compareAndIncreaseOnly(AtomicLong target,
long value) |
static void |
deleteFile(File file) |
static String |
file2String(File file) |
static String |
file2String(String fileName) |
static String |
file2String(URL url) |
static String |
getLocalhostByNetworkInterface() |
static List<String> |
getLocalInetAddress() |
static String |
humanReadableByteCount(long bytes,
boolean si) |
static boolean |
isPropertiesEqual(Properties p1,
Properties p2) |
static Properties |
object2Properties(Object object) |
static void |
properties2Object(Properties p,
Object object) |
static String |
properties2String(Properties properties) |
static void |
string2File(String str,
String fileName) |
static void |
string2FileNotSafe(String str,
String fileName) |
static Properties |
string2Properties(String str) |
public static final Charset DEFAULT_CHARSET
public static void string2File(String str, String fileName) throws IOException
IOExceptionpublic static void string2FileNotSafe(String str, String fileName) throws IOException
IOExceptionpublic static String file2String(String fileName) throws IOException
IOExceptionpublic static String file2String(File file) throws IOException
IOExceptionpublic static String properties2String(Properties properties)
public static Properties string2Properties(String str)
public static Properties object2Properties(Object object)
public static void properties2Object(Properties p, Object object)
public static boolean isPropertiesEqual(Properties p1, Properties p2)
public static String getLocalhostByNetworkInterface() throws SocketException
SocketExceptionpublic static boolean compareAndIncreaseOnly(AtomicLong target, long value)
public static String humanReadableByteCount(long bytes, boolean si)
public static void deleteFile(File file)
Copyright © 2023. All rights reserved.