private byte flagNameStr = 1;
private String myTxt = "Gg";
try {
FileInputStream fileInput = openFileInput("file.txt");
InputStreamReader readerlist = new InputStreamReader(fileInput);
BufferedReader bufferlist = new BufferedReader(readerlist);
StringBuffer strBuffer = new StringBuffer();
String lines;
while ((lines = bufferlist.readLine()) != myTxt && (lines = bufferlist.readLine()) != null){
flagNameStr = 1;
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
while (lines = bufferlist.readLine()){
if (lines.equals(myTxt)) {
flagNameStr = 1;
break;
}
}