public boolean isReadOnly() throws IOException {
  return file == null || !file.canWrite();
}

public boolean isReadOnly ( ) throws IOException { return file == null || ! file . canWrite ( ) ; }
is connected document readonly ?
