hi Anton,
i am sorry but i am not able to understand why we want to restrict "some" class from writing a file whereas others are able to write??
i am not an expert on this but i have a code solution for this if you are able to change the code of the
applet downloaded (its an applet , right?)...
what you can do is- if you have a particular class that handles a request for file writing or a method that hanles the request for file writing then you can pass a boolean variable to indiate if the write should really happen or not.
from the calling class you pass 'true' if the class is allowed to write else pass 'false' if you want that class not able to write and throw an exception...
well, this you also might have thought about but i am not sure what you have so i just did put down my thoughts...
there is another possiblity as well,
you can have method enableFileWrite() where you set above mentioned boolean variable for the class that is actually performing File Write and then allow other classes to write the file via that File Writer class's method if that boolean variable is set to be true priorly you know...do you get what i mean here?
i don't think there would be something on higher level that will allow you to restrict certain classes from writing while allowing others from the same code base...
do you have multiple packages that gets downloaded and you want to restrict some other packages' class other than your package or something???
please clarify exact scenario you have...
regards
maulin