title: Java reading and writing objects to a file
body: <p>I have been tasked with creating a class (RandomAccessObjectFile) that provides reading and writing of objects as well as seeking within a file. This is my first time using Java File NIO and want to make sure I am grasping it correctly. Below are the methods I am required to have in the class and am looking for some help and more understanding on how to approach the rest of this class. </p>
  
  <pre><code>public class RandomAccessObjectFile {
  
  RandomAccessFile raFile;
  private RandomAccessObjectFile(String fileName) throws FileNotFoundException {
      raFile = new RandomAccessFile(new File(fileName), "rw");
  }
  
  static void create(String fileName) throws IOException {
      Path createTarget = Paths.get(fileName);
      Files.createFile(createTarget);
  }
  
  static void delete(String fileName) throws IOException {
      Path deleteTarget = Paths.get(fileName);
      Files.delete(deleteTarget);
  }
  
  static RandomAccessObjectFile open(String fileName) {
  
  }
  
  &lt;T&gt; void write(T obj) {
  }
  
  &lt;T&gt; T read() {
  
  }
  
  void seek(long location) {
  }
  
  long length() {
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks ahead of time for all of your help!</p>