public class IO extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IO.ConvertToPathFunction |
static interface |
IO.EachLine |
Modifier and Type | Field and Description |
---|---|
static String |
CLASSPATH_SCHEMA |
static IO.ConvertToPathFunction |
convertToPathFunction |
static Charset |
DEFAULT_CHARSET |
static String |
FILE_SCHEMA |
static String |
JAR_FILE_SCHEMA |
static String |
JAR_SCHEMA |
Constructor and Description |
---|
IO() |
Modifier and Type | Method and Description |
---|---|
static int |
copy(Reader input,
Writer output) |
static int |
copy(Reader input,
Writer output,
char[] copyBuf) |
static long |
copyLarge(Reader reader,
Writer writer) |
static long |
copyLarge(Reader reader,
Writer writer,
char[] buffer) |
static Path |
createChildDirectory(Path parentDir,
String childDir) |
static void |
createDirectories(Path path) |
static void |
createDirectories(String path) |
static Path |
createDirectory(Path dir) |
static Path |
createDirectory(String dir) |
static URI |
createURI(String path) |
static void |
delete(Path path) |
static void |
delete(String path) |
static void |
eachLine(BufferedReader reader,
IO.EachLine eachLine) |
static void |
eachLine(File file,
IO.EachLine eachLine) |
static void |
eachLine(InputStream is,
IO.EachLine eachLine) |
static void |
eachLine(Reader reader,
IO.EachLine eachLine) |
static void |
eachLine(String location,
IO.EachLine eachLine) |
static boolean |
exists(Path path) |
static boolean |
exists(String path) |
static FileSystem |
fileSystem() |
static byte[] |
input(InputStream inputStream) |
static byte[] |
input(String fileName) |
static InputStream |
inputStream(String resource) |
static List<String> |
list(Path path) |
static List<String> |
list(String path) |
static List<String> |
listByExt(String path,
String ext) |
static List<String> |
listByFileExtension(Path pathFromFileSystem,
String ext) |
static List<String> |
listByFileExtension(String path,
String ext) |
static List<String> |
listByFileExtensionRecursive(Path pathFromFileSystem,
String ext) |
static List<String> |
listByFileExtensionRecursive(String path,
String ext) |
static List<String> |
listByGlob(Path pathFromFileSystem,
String glob) |
static List<String> |
listByGlob(String path,
String glob) |
static List<Path> |
listPath(Path path) |
static void |
output(Path file,
byte[] bytes) |
static void |
output(String file,
byte[] bytes) |
static Path |
path(Path path,
String... more) |
static Path |
path(String location) |
static Path |
path(String path,
String... more) |
static List<Path> |
paths(Path path) |
static List<Path> |
paths(String path) |
static List<Path> |
pathsByExt(String path,
String ext) |
static String |
read(File file) |
static String |
read(InputStream inputStream) |
static CharBuf |
read(InputStream inputStream,
CharBuf charBuf) |
static CharBuf |
read(InputStream inputStream,
CharBuf charBuf,
Charset charset) |
static CharBuf |
read(InputStream inputStream,
CharBuf charBuf,
Charset charset,
int bufSize,
char[] copyBuf) |
static String |
read(InputStream inputStream,
Charset charset) |
static String |
read(InputStream inputStream,
String charset) |
static String |
read(Path path) |
static String |
read(Reader input) |
static CharBuf |
read(Reader input,
CharBuf charBuf) |
static CharBuf |
read(Reader input,
CharBuf charBuf,
int bufSize,
char[] copyBuffer) |
static String |
read(String location) |
static char[] |
readCharBuffer(InputStream inputStream) |
static String |
readCharBuffer(InputStream inputStream,
Charset charset) |
static char[] |
readCharBuffer(Path path) |
static char[] |
readCharBuffer(Reader input) |
static char[] |
readCharBuffer(Reader reader,
int size) |
static String |
readChild(Path parentDir,
String childFileName) |
static String |
readFromClasspath(Class<?> clazz,
String location) |
static String |
readFromClasspath(String location) |
static List<String> |
readLines(BufferedReader reader) |
static List<String> |
readLines(File file) |
static List<String> |
readLines(InputStream is) |
static List<String> |
readLines(Reader reader) |
static List<String> |
readLines(String location) |
static String |
readPath(Path path) |
static String |
readResource(String location) |
static Path |
uriToPath(URI uri) |
static void |
write(OutputStream out,
String content) |
static void |
write(OutputStream out,
String content,
Charset charset) |
static void |
write(Path file,
byte[] contents) |
static void |
write(Path file,
String contents) |
static void |
write(String file,
byte[] contents) |
static void |
write(String file,
String contents) |
static void |
writeChild(Path parentDir,
String childFileName,
String childContents) |
static void |
writeNoClose(OutputStream out,
String content) |
static FileSystem |
zipFileSystem(URI fileJarURI) |
public static final Charset DEFAULT_CHARSET
public static final String FILE_SCHEMA
public static final String JAR_SCHEMA
public static final String CLASSPATH_SCHEMA
public static final String JAR_FILE_SCHEMA
public static IO.ConvertToPathFunction convertToPathFunction
public static FileSystem zipFileSystem(URI fileJarURI)
public static List<String> listByFileExtension(Path pathFromFileSystem, String ext)
public static List<String> listByFileExtensionRecursive(String path, String ext)
public static List<String> listByFileExtensionRecursive(Path pathFromFileSystem, String ext)
public static char[] readCharBuffer(Path path)
public static String read(InputStream inputStream, Charset charset)
public static String read(InputStream inputStream, String charset)
public static String readCharBuffer(InputStream inputStream, Charset charset)
public static String read(InputStream inputStream)
public static char[] readCharBuffer(InputStream inputStream)
public static CharBuf read(InputStream inputStream, CharBuf charBuf)
public static CharBuf read(InputStream inputStream, CharBuf charBuf, Charset charset)
public static CharBuf read(InputStream inputStream, CharBuf charBuf, Charset charset, int bufSize, char[] copyBuf)
public static byte[] input(String fileName)
public static byte[] input(InputStream inputStream)
public static char[] readCharBuffer(Reader input)
public static char[] readCharBuffer(Reader reader, int size)
public static void eachLine(Reader reader, IO.EachLine eachLine)
public static List<String> readLines(InputStream is)
public static void eachLine(InputStream is, IO.EachLine eachLine)
public static List<String> readLines(BufferedReader reader)
public static void eachLine(BufferedReader reader, IO.EachLine eachLine)
public static void eachLine(File file, IO.EachLine eachLine)
public static void eachLine(String location, IO.EachLine eachLine)
public static void write(OutputStream out, String content, Charset charset)
public static void writeChild(Path parentDir, String childFileName, String childContents)
public static FileSystem fileSystem()
public static void output(String file, byte[] bytes)
public static void output(Path file, byte[] bytes)
public static void write(String file, byte[] contents)
public static void write(Path file, byte[] contents)
public static void write(OutputStream out, String content)
public static void writeNoClose(OutputStream out, String content)
public static InputStream inputStream(String resource)
public static void delete(Path path)
public static void createDirectories(Path path)
public static void delete(String path)
public static void createDirectories(String path)
public static boolean exists(Path path)
public static boolean exists(String path)
Copyright © 2014. All rights reserved.