Posts tagged "Make File Read Only "

Tag Archives: Make File Read Only

Make file Read Only in Java

To make file Read Only in Java, we use setReadOnly() method of the java.io.File 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