code: public synchronized boolean isReadOnly() throws SQLException {
  
          checkClosed();
  
          try {
              return sessionProxy.isReadOnlyDefault();
          } catch (HsqlException e) {
              throw Util.sqlException(e);
          }
      }
docs: Retrieves whether this <code>Connection</code>
  object is in read-only mode.
  
  @return <code>true</code> if this <code>Connection</code> object
  is read-only; <code>false</code> otherwise
  @exception SQLException SQLException if a database access error occurs
  (JDBC4 Clarification:)
  or this method is called on a closed connection