code: private final void writeHeartbeat()
      throws LockFile.FileSecurityException,
             LockFile.UnexpectedEndOfFileException,
             LockFile.UnexpectedFileIOException {
  
          try {
              raf.seek(MAGIC.length);
              raf.writeLong(System.currentTimeMillis());
          } catch (SecurityException ex) {
              throw new FileSecurityException(this, "writeHeartbeat", ex);
          } catch (EOFException ex) {
              throw new UnexpectedEndOfFileException(this, "writeHeartbeat", ex);
          } catch (IOException ex) {
              throw new UnexpectedFileIOException(this, "writeHeartbeat", ex);
          }
      }
docs: Writes the current hearbeat timestamp value to this object's lock
  file. <p>
  
  @throws FileSecurityException possibly never (seek and write are native
  methods whose JavaDoc entries do not actually specifiy 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 attepting to write the heartbeat timestamp value to
  the target file (typically, this cannot happen, but the case is
  included to distiguish it from the general IOException case).
  @throws UnexpectedFileIOException if the current heartbeat timestamp
  value cannot be written due to an underlying I/O error