Posts tagged "Read Only File in Java "

Tag Archives: Read Only File in Java

Make file Read Only in Java

To make file Read Only in Java, we use setReadOnly() method of the package. Since JDK 1.6, a new setWritable() method is provided to make a file be writable again. We can also check whether the file is writable or read-only using the canWrite() method. We will see the whole process in the below-mentioned example. We will see, how … Continue reading Make file Read Only in Java