Java-StreamTokenizer

StreamTokenizer The StreamTokenizer is used to breaks up the Reading stream into tokens that are delimited by sets of characters. The next token is obtained from the Reading stream by calling nextToken( ). It returns the type of token. StreamTokenizer defines four int constants : TT EOF, TT EOL, TT NUMBER, and TT WORD. There … Read more…

Java-Append Data to the End of Existing File

Append Data to the End of Existing File The following program shows how we could append items to an existing file using the RandomAccessFile class. This program opens the file “data.da” created by previous program and then appends bytes to the end. Program Program Source import java.io.RandomAccessFile; import java.io.IOException; class Javaapp { public static void main(String[] args) … Read more…