According to the NFC Forum Type 1 and Type 2 Specification, a NDEF Message can be set to read-only by changing the byte 3 of the CC area. I tested inside the emulator and it is supported correctly. The only problem is that I don't see any way to access this byte with JSR-257 and its extension (save for implementing my own extension of PlainTagConnection).
EDIT: Same with the possibility to lock each block with bytes 0 and 1 of the last block: these bytes are outside the NDEF message, so they can't be accessed.
Is that right, or did I miss something? Is there any way to lock a (whole or part of) NFC Forum type 1 or 2 tag in a MIDlet?
(Please note that I know about Mifare tags, I'm asking specifically for NFC Forum Type 1 or Type 2 tags).