code: private final void writeMagic()
      throws LockFile.FileSecurityException,
             LockFile.UnexpectedEndOfFileException,
             LockFile.UnexpectedFileIOException {
  
          try {
              raf.seek(0);
              raf.write(MAGIC);
          } catch (SecurityException ex) {
              throw new FileSecurityException(this, "writeMagic", ex);
          } catch (EOFException ex) {
              throw new UnexpectedEndOfFileException(this, "writeMagic", ex);
          } catch (IOException ex) {
              throw new UnexpectedFileIOException(this, "writeMagic", ex);
          }
      }
docs: Writes the {@link #MAGIC} value to this object's lock file that
  distiguishes it as an HSQLDB lock file. <p>
  
  @throws FileSecurityException possibly never (seek and write are native
  methods whose JavaDoc entries do not actually specify throwing
  <tt>SecurityException</tt>).  However, it is conceivable that these
  native methods may, in turn, access Java methods that do
  throw <tt>SecurityException</tt>. In this case, a
  <tt>SecurityException</tt> might be thrown if a required system
  property value cannot be accessed, or if a security manager exists
  and its <tt>{@link
  java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)}</tt>
  method denies write access to the file
  @throws UnexpectedEndOfFileException if an end of file exception is
  thrown while attempting to write the <tt>MAGIC</tt> value to the
  target file (typically, this cannot happen, but the case is
  included to distiguish it from the general <tt>IOException</tt>
  case).
  @throws UnexpectedFileIOException if any other I/O error occurs while
  attepting to write the <tt>MAGIC</tt> value to the target file.