More on File Structures in NetBeans IDE

package romano2;
import java.io.*;
import java.lang.*;
import javax.swing.*;
public class main {
/** Creates a new instance of main */
public main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
FileOutputStream fileout;
DataOutputStream dataout;
try{
fileout=new FileOutputStream("c://kikiki");
dataout=new DataOutputStream(fileout);
for(int a=1;a<=10;a++)
{
dataout.writeInt(22); // write int field 4 bytes
dataout.writeInt(212); // write an int field 4
bytes
dataout.writeUTF("address"); // write a string field of
length 7
}
fileout.close();
RandomAccessFile out=new RandomAccessFile("c://kikiki","rw");
out.seek(8); // skip over 2 int fields
String s=out.readUTF(); // get string fiels
JOptionPane.showMessageDialog(null,s);
out.seek(59); // skip first 3 records and 2 int fields in 4th record
out.writeUTF("hello22"); // put hello22 in uth field of 4th record
out.close();
}
catch(IOException e) {
}
}
// TODO code application logic here
}