util
Class AddLine
java.lang.Object
util.AddLine
public class AddLine
- extends Object
This class reads an ascii-file and adds a certain line to it at the
specified position or at the end of the file.
|
Method Summary |
static boolean |
insert(File read,
File put,
int where,
boolean ifnot,
String line)
Opens a file, reads until the desired line number is read, inserts the
line and continues inserting until EOF. |
static void |
main(String[] arg)
Scans the input line for the name of the input file, the line to
insert to the file and, if present, the line number where it should be
entered. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddLine
public AddLine()
insert
public static boolean insert(File read,
File put,
int where,
boolean ifnot,
String line)
- Opens a file, reads until the desired line number is read, inserts the
line and continues inserting until EOF.
If the line number is negative, the line is entered at the EOF.
main
public static void main(String[] arg)
- Scans the input line for the name of the input file, the line to
insert to the file and, if present, the line number where it should be
entered.