public class TextFileHelper extends ArrayList<String>
modCount| 构造器和说明 |
|---|
TextFileHelper(String fileName)
Normally read by lines:
|
TextFileHelper(String fileName,
String splitter)
Read a file, split by any regular expression:
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
read(String fileName)
Read a file as a single string:
|
void |
write(String fileName)
Write.
|
static void |
write(String fileName,
String text)
Write a single file in one method call:
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringcontainsAll, equals, hashCodeparallelStream, streampublic TextFileHelper(String fileName, String splitter)
fileName - the file namesplitter - the splitterpublic TextFileHelper(String fileName)
fileName - the file namepublic static String read(String fileName)
fileName - the file namepublic static void write(String fileName, String text)
fileName - the file nametext - the textpublic void write(String fileName)
fileName - the file nameCopyright © 2017. All rights reserved.