public static Homework_database read(int value) {
             Homework_database homeworkreturn = null;
    {
         try {
             
RandomAccessFile raf = new RandomAccessFile(login_area.setURL.getUrl(), "rw");

raf.seek(raf.length());
raf.seek(538*value);

 Timetable_main_EDIT.delete = raf.read();
 
raf.seek(raf.length());
raf.seek(538*value);

raflength =   (((int) raf.length())/538);

  Timetable_main_EDIT.ID = raf.readInt();
  Timetable_main_EDIT.subject = raf.readUTF();
  Timetable_main_EDIT.desc = raf.readUTF();
  Timetable_main_EDIT.diff = raf.readUTF();
  Timetable_main_EDIT.time = raf.read();
  Timetable_main_EDIT.delete = raf.read();
  
  removespaces();
  
  
  raflength =   (((int) raf.length())/538);
 
  
} catch (EOFException ex) { //This exception will be caught when EOF is reached
           //  JOptionPane.showMessageDialog(null,"No more homeworks left! :)", "Timetable Management Program", JOptionPane.INFORMATION_MESSAGE);
} catch (FileNotFoundException e) {
        e.printStackTrace();
} catch (IOException e) {
        e.printStackTrace();
} 
         
  
}
     return homeworkreturn;

}