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 String
read(File f)
static String
read(InputStream stream, int maxLines)
static String
read(Reader reader)
static String
read(String fileName)
static String
read(URL fileURL)
Tools to read and write files as single strings:void
write(File file)
void
write(String fileName)
static void
write(String fileName, String text)
static void
write(String fileName, String text, ProgressManager pm)
void
writeE(File file, String encoding)
void
writeE(String fileName, String encoding)
static void
writeE(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, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods 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
-