I wrote a piece of code to read value from a file ,
public class Test {
public static void main(String[] args) throws Exception {
// pass the path to the file as a parameter
FileReader fr = new FileReader("/home/workspace_ag7_tmv/Message Router/environments/wb/conf/subscriber_content_restriction.conf");
int i;
while ((i=fr.read()) != -1) {
System.out.print((char) i);
}
}
}
In my file I passed these value : PRE|00000000110000200000049U POS|10000000110000200000049U
I am able to get these values using above piece of code, Now I want to fetch 4th index value. Can you please help me how to do same ?