I just had a look at
the API documentation and I see that SMBFile has a setReadWrite() method. Seems to me that should take care of your first question, no?
As for what setAttribute() does, remember that jCIFS is for accessing a
Windows file system. So the method allows you to modify the attributes of a Windows file, which are "Archived", "Hidden", "Read-only", and "System". Check out the documentation for SMBFile and you'll see how exactly to modify those attributes.