Class TextFile
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<String>,Collection<String>,List<String>,RandomAccess
public class TextFile extends ArrayList<String>
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description static Stringread(File f)static Stringread(InputStream stream, int maxLines)static Stringread(Reader reader)static Stringread(String fileName)static Stringread(URL fileURL)Tools to read and write files as single strings:voidwrite(File file)voidwrite(String fileName)static voidwrite(String fileName, String text)static voidwrite(String fileName, String text, ProgressManager pm)voidwriteE(File file, String encoding)voidwriteE(String fileName, String encoding)static voidwriteE(String fileName, String text, String encoding)Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
TextFile
public TextFile() -
TextFile
- Throws:
IOException
-
TextFile
- Throws:
IOException
-
TextFile
- Throws:
IOException
-
TextFile
- Throws:
IOException
-
TextFile
- Throws:
IOException
-
-
Method Details
-
read
Tools to read and write files as single strings:- Parameters:
fileURL-- Returns:
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
writeE
- Throws:
IOException
-
writeE
- Throws:
IOException
-
writeE
- Throws:
IOException
-
write
- Throws:
IOException
-