public class IOUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
byteArrayToInt(byte[] value)
Convert byte array to int, little endian
|
static void |
closeQuietly(Closeable output) |
static void |
copyFile(File src,
File dst) |
static void |
copyStream(InputStream in,
OutputStream out) |
static void |
copyStream(InputStream in,
OutputStream out,
long n) |
static void |
decompressGzip(File src,
File trgt) |
static InputStream |
getFileInputStream(String fileName) |
static BufferedReader |
getFileReader(String fileName) |
static byte[] |
intToByteArray(int value)
Convert int to byte array, little endian
|
static void |
moveFile(File src,
File dst) |
static void |
printBits(long val,
int bits) |
static void |
printBitsln(long val,
int bits) |
static byte[] |
readBuffer(InputStream input,
int length,
ProgressListener listener) |
static byte |
readByte(InputStream in) |
static String |
readChars(InputStream in,
int numChars) |
static int |
readInt(InputStream in)
Read int, little endian
|
static String |
readLine(InputStream in,
char character) |
static long |
readLong(InputStream input)
Read long, little endian.
|
static short |
readShort(InputStream in) |
static void |
skip(InputStream in,
long n) |
static CharSequence |
toBinaryString(int val) |
static CharSequence |
toBinaryString(long val) |
static void |
writeBuffer(OutputStream output,
byte[] buffer,
int offset,
int length,
ProgressListener listener) |
static void |
writeByte(OutputStream out,
byte value) |
static void |
writeInt(OutputStream output,
int value)
Write int, little endian
|
static void |
writeLong(OutputStream output,
long value)
Write long, little endian
|
static void |
writeShort(OutputStream out,
short value) |
static void |
writeString(OutputStream out,
String str) |
public static InputStream getFileInputStream(String fileName) throws IOException
IOExceptionpublic static BufferedReader getFileReader(String fileName) throws IOException
IOExceptionpublic static String readLine(InputStream in, char character) throws IOException
IOExceptionpublic static String readChars(InputStream in, int numChars) throws IOException
IOExceptionpublic static void writeString(OutputStream out, String str) throws IOException
IOExceptionpublic static void writeBuffer(OutputStream output, byte[] buffer, int offset, int length, ProgressListener listener) throws IOException
IOExceptionpublic static void copyStream(InputStream in, OutputStream out) throws IOException
IOExceptionpublic static void copyStream(InputStream in, OutputStream out, long n) throws IOException
IOExceptionpublic static void copyFile(File src, File dst) throws IOException
IOExceptionpublic static void moveFile(File src, File dst) throws IOException
IOExceptionpublic static void decompressGzip(File src, File trgt) throws IOException
IOExceptionpublic static void writeLong(OutputStream output, long value) throws IOException
output - value - IOExceptionpublic static long readLong(InputStream input) throws IOException
input - IOExceptionpublic static void writeInt(OutputStream output, int value) throws IOException
output - value - IOExceptionpublic static byte[] intToByteArray(int value)
public static int readInt(InputStream in) throws IOException
input - IOExceptionpublic static int byteArrayToInt(byte[] value)
value - public static byte[] readBuffer(InputStream input, int length, ProgressListener listener) throws IOException
din - bytes - listener - IOExceptionpublic static CharSequence toBinaryString(long val)
public static CharSequence toBinaryString(int val)
public static void printBitsln(long val,
int bits)
public static void printBits(long val,
int bits)
public static short readShort(InputStream in) throws IOException
IOExceptionpublic static void writeShort(OutputStream out, short value) throws IOException
IOExceptionpublic static byte readByte(InputStream in) throws IOException
IOExceptionpublic static void writeByte(OutputStream out, byte value) throws IOException
IOExceptionpublic static void skip(InputStream in, long n) throws IOException
IOExceptionpublic static void closeQuietly(Closeable output)
Copyright © 2018 DataWeb Research. All rights reserved.