|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.web.databasesupport.tools.iotools.ASCIIFile
handles ASCII-files
Constructor Summary | |
ASCIIFile()
|
Method Summary | |
static boolean |
append(java.io.File dest,
java.lang.String text)
Appends a text at a spezified file. |
static int |
countLines(java.io.File source)
Counts the available lines of the given file. |
static boolean |
insert(java.io.File dest,
java.lang.String text,
int linenumber)
Inserts a text at the given linenumber of the spezified file. |
static java.lang.String |
read(java.io.File source)
Reads a text from the spezified File and returns it as one big String. |
static java.lang.String[] |
readAsArray(java.io.File source)
Reads a text from the spezified File and returns it as a String-array. each line is represented as one field in the array. |
static java.util.Vector |
readAsVector(java.io.File source)
Reads a text from the spezified File and returns it as a Vector of Strings. each line is represented through one String-object in the Vector. |
static boolean |
write(java.io.File dest,
java.lang.String text,
boolean overwrite)
Writes a text to the spezified File, if allowed. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public ASCIIFile()
Method Detail |
public static boolean write(java.io.File dest, java.lang.String text, boolean overwrite) throws java.io.IOException
dest
- Destination-file to write the text in.text
- Text to put in the file.overwrite
- Flag if allowed to overwrite an existing file (true if alowed, false otherwise).public static java.lang.String read(java.io.File source) throws java.io.IOException
source
- Source-file to to read from.public static java.util.Vector readAsVector(java.io.File source) throws java.io.IOException
source
- Source-file to to read from.public static java.lang.String[] readAsArray(java.io.File source) throws java.io.IOException
source
- Source-file to to read from.public static boolean append(java.io.File dest, java.lang.String text)
dest
- Destination-file to to append the text at.text
- The text to append.public static boolean insert(java.io.File dest, java.lang.String text, int linenumber) throws java.lang.IndexOutOfBoundsException
dest
- Destiantion-file where to insert the text.text
- The text to insert.linenumber
- The linenumber where to insert the text.public static int countLines(java.io.File source) throws java.io.IOException
source
- The Source-file to count the lines of.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |