public class IOUtils extends Object
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedReader |
fileReader(File file) |
static BufferedReader |
fileReader(String file) |
static BufferedWriter |
fileWriter(File file) |
static BufferedWriter |
fileWriter(String file) |
static BufferedReader |
gzipFileReader(File file) |
static BufferedReader |
gzipFileReader(String file) |
static BufferedWriter |
gzipFileWriter(File file) |
static BufferedWriter |
gzipFileWriter(String file) |
static String |
readString(BufferedReader r) |
static String |
readString(InputStream is) |
static BufferedReader |
resource(String resourcePath)
Read a resource from the classpath or fallback to treating it as a file.
|
public static BufferedReader resource(String resourcePath) throws IOException
resourcePath - resource path inside your jar, or a path to an actual fileIOException - if something goes wrong with the streampublic static BufferedWriter gzipFileWriter(String file) throws IOException
IOExceptionpublic static BufferedWriter gzipFileWriter(File file) throws IOException
IOExceptionpublic static BufferedWriter fileWriter(String file) throws IOException
IOExceptionpublic static BufferedWriter fileWriter(File file) throws IOException
IOExceptionpublic static BufferedReader gzipFileReader(String file) throws IOException
IOExceptionpublic static BufferedReader gzipFileReader(File file) throws IOException
IOExceptionpublic static BufferedReader fileReader(String file) throws IOException
IOExceptionpublic static BufferedReader fileReader(File file) throws IOException
IOExceptionpublic static String readString(BufferedReader r)
public static String readString(InputStream is)
Copyright © 2016 Inbot. All Rights Reserved.