public class IoUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
base64Encode(byte[] data,
boolean withLineBreak) |
static void |
closeQuietly(Closeable closable) |
static String |
convertSequenceName(String sequenceName) |
static File |
expandFilepath(File file) |
static String |
expandFilepath(String path) |
static String |
getHostAddress() |
static int |
getIndex(byte[] arrayA,
byte[] arrayB) |
static void |
mkdirsParent(Path path) |
static HttpURLConnection |
openHttpConn(URL url) |
static int |
parseInt(byte[] bytes,
int offset) |
static short |
parseShort(byte[] bytes,
int offset) |
static byte[] |
read(File file) |
static byte[] |
read(InputStream in) |
static byte[] |
read(String fileName) |
static String |
readLineFromConsole(String prompt) |
static char[] |
readPasswordFromConsole(String prompt) |
static void |
save(File file,
byte[] content) |
static void |
save(String fileName,
byte[] encoded) |
static void |
writeInt(int value,
byte[] dest,
int destOffset) |
static void |
writeShort(short value,
byte[] dest,
int destOffset) |
public static void closeQuietly(Closeable closable)
public static byte[] read(String fileName) throws IOException
IOExceptionpublic static byte[] read(File file) throws IOException
IOExceptionpublic static byte[] read(InputStream in) throws IOException
IOExceptionpublic static void save(String fileName, byte[] encoded) throws IOException
IOExceptionpublic static void save(File file, byte[] content) throws IOException
IOExceptionpublic static void mkdirsParent(Path path) throws IOException
IOExceptionpublic static String getHostAddress() throws SocketException
SocketExceptionpublic static void writeShort(short value,
byte[] dest,
int destOffset)
public static short parseShort(byte[] bytes,
int offset)
public static void writeInt(int value,
byte[] dest,
int destOffset)
public static int parseInt(byte[] bytes,
int offset)
public static int getIndex(byte[] arrayA,
byte[] arrayB)
public static String base64Encode(byte[] data, boolean withLineBreak)
public static HttpURLConnection openHttpConn(URL url) throws IOException
IOExceptionpublic static char[] readPasswordFromConsole(String prompt)
Copyright © 2018. All rights reserved.