code: public boolean isReadOnly() throws SQLException {
  
          ResultSet rs = execute("CALL isReadOnlyDatabase()");
  
          rs.next();
  
          boolean result = rs.getBoolean(1);
  
          rs.close();
  
          return result;
      }
docs: Retrieves whether this database is in read-only mode.
  
  <!-- start release-specific documentation -->
  <div class="ReleaseSpecificDocumentation">
  <h3>HSQLDB-Specific Information:</h3> <p>
  
  Starting with 1.7.2, this makes
  an SQL call to the new isReadOnlyDatabase function
  which provides correct determination of the read-only status for
  both local and remote database instances.
  </div>
  <!-- end release-specific documentation -->
  @return <code>true</code> if so; <code>false</code> otherwise
  @exception SQLException if a database access error occurs