السلام عليكــم ورحمـة الله وبركاتــه ،،
عندي ملف نصي يوجد فيه الكلمات التالية
line 1
line2
اريد ان تتم القراءه سطر سطر
وهذا هو الكود
ByteArrayOutputStream baos = new ByteArrayOutputStream();
StringBuffer sb = new StringBuffer();
int chars=0;
try{
while((chars = is.read()) != -1){
baos.write(chars);
}
String response = new String(baos.toByteArray());
}catch (Exception e){}
InputStream is = getClass().getResourceAsStream("/file/word.txt");ارجو منكم المساعدة