this (new File(fileName), mode);
int fdmode; if (mode.equals("r")) fdmode = FileChannelImpl.READ; else if (mode.equals("rw")) fdmode = FileChannelImpl.READ | FileChannelImpl.WRITE; else if (mode.equals("rws")) { fdmode = (FileChannelImpl.READ | FileChannelImpl.WRITE | FileChannelImpl.SYNC); } else if (mode.equals("rwd")) { fdmode = (FileChannelImpl.READ | FileChannelImpl.WRITE | FileChannelImpl.DSYNC); } else throw new IllegalArgumentException ("invalid mode: " + mode);  final String fileName = file.getPath();   SecurityManager s = System.getSecurityManager(); if (s != null) { s.checkRead(fileName);  if ((fdmode & FileChannelImpl.WRITE) != 0) s.checkWrite(fileName); }  try { ch = FileChannelImpl.create(file, fdmode); } catch (FileNotFoundException fnfe) { throw fnfe; } catch (IOException ioe) { FileNotFoundException fnfe = new FileNotFoundException(file.getPath()); fnfe.initCause(ioe); throw fnfe; } fd = new FileDescriptor(ch); if ((fdmode & FileChannelImpl.WRITE) != 0) out = new DataOutputStream (new FileOutputStream (fd)); else out = null; in = new DataInputStream (new FileInputStream (fd));
  public RandomAccessFile (String fileName, String mode)    throws FileNotFoundException  {    this (new File(fileName), mode);  }