?
package com.javarush.task.task18.task1822;
import java.io.*;
/*
Поиск данных внутри файла
*/
public class Solution {
public static void main(String[] args) throws IOException {
String id = args[0];
int index=0;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
FileInputStream stream = new FileInputStream(reader.readLine());
reader.close();
if(stream.available()>0)
{
byte[] buff = new byte[stream.available()];
stream.read(buff);
stream.close();
String [] mass = new String(buff).split("\n");
for (int i=0;i<mass.length;i++)
{
if(mass[i].startsWith(id))
{
index=i;
break;
}
}
System.out.println(mass[index]);
}
}
}