AbacusUtil Docs | Download | Javadoc | FAQ | Community

IOUtil

IOUtil provides the most daily used methods to read/write byte/char/String/... from/to File/InputStream/Reader/OutputStream/Writer..., and APIs to parse File/InputStream/Reader.

File file = new File("./myTestFile.txt");
IOUtil.write(file, "Hello AbacusUtil");

String str = IOUtil.readString(file);
N.println(str);

assertEquals("Hello AbacusUtil", str);

assertEquals("abc", String.valueOf(IOUtil.bytes2Chars(IOUtil.chars2Bytes("abc".toCharArray()))));