hello guys I want to give file permission to open in read mode or write mode .ext contains file extention and file_name contains name of file. f_p is a veriable where I an geting input as 'r' or 'w' mode. Here I am using same file at different locations
But in this code I am getting error as cannot find symbol: method setReadable(boolean) location: fos2 is of type FileOutputStream
<%
some code here
FileInputStream fis2 = new FileInputStream("e:/profile/epy/"+file_name+".ext");
FileOutputStream fos2 = new FileOutputStream("e:/decrypt/"+file_name+"."+ext);
if(f_p.equals("R")||f_p.equals("r"))
{
fos2.setReadable(true);
}
else if(f_p.equals("W")||f_p.equals("w"))
{
fos2.setWritable(true);
}
// some code here