| Constructor and Description |
|---|
TextFile() |
| Modifier and Type | Method and Description |
|---|---|
static void |
bytesToFile(byte[] bytes,
String path) |
static String |
bytesToString(byte[] bs) |
static byte[] |
fileToBytes(String srcFile) |
static String |
fileToString(File f) |
static String |
fileToString(String src) |
static List<String> |
readAllLines(String path) |
static byte[] |
streamToBytes(InputStream input) |
static String |
streamToString(InputStream input) |
static byte[] |
stringToBytes(String content,
boolean bom) |
static void |
stringToFile(String content,
File file) |
static void |
stringToFile(String content,
File file,
boolean bom) |
static void |
stringToFile(String content,
String path) |
static void |
stringToFile(String content,
String path,
boolean bom) |
static void |
stringToFileNoPrefix(String content,
String path) |
static void |
writeAllLines(String path,
List<String> lines) |
public TextFile()
public static List<String> readAllLines(String path) throws IOException
IOExceptionpublic static void writeAllLines(String path, List<String> lines) throws IOException
IOExceptionpublic static void stringToFile(String content, File file) throws IOException
IOExceptionpublic static byte[] stringToBytes(String content, boolean bom) throws IOException
IOExceptionpublic static void stringToFile(String content, String path) throws IOException
IOExceptionpublic static void stringToFile(String content, File file, boolean bom) throws IOException
IOExceptionpublic static void stringToFile(String content, String path, boolean bom) throws IOException
IOExceptionpublic static void stringToFileNoPrefix(String content, String path) throws IOException
IOExceptionpublic static String fileToString(File f) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic static String fileToString(String src) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic static String streamToString(InputStream input) throws IOException
IOExceptionpublic static byte[] streamToBytes(InputStream input) throws IOException
IOExceptionpublic static void bytesToFile(byte[] bytes, String path) throws IOException
IOExceptionpublic static byte[] fileToBytes(String srcFile) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic static String bytesToString(byte[] bs) throws IOException
IOExceptionCopyright © 2014–2018 University Health Network. All rights reserved.