import java.io.*;
public class vygenerujSoubor
{
public static void main( String [] args )
{
int i = 0;
String[] pomocne = new String [99];
try
{
FileReader fro = new FileReader( "a.txt" );
BufferedReader bro = new BufferedReader( fro );
String stringFromFile = bro.readLine( );
pomocne[0] = stringFromFile;
while( stringFromFile != null )
{
i++;
stringFromFile = bro.readLine();
pomocne[i] = stringFromFile;
}
bro.close( );
char b = '"';
Writer out = new FileWriter("b.txt");
for (int a = 0; a < pomocne.length; a++)
{
if (pomocne[a] != null)
{
pomocne[a] = "poleSlov["+a+"] = "+b+pomocne[a]+b+";";
out.write(pomocne[a]+"\n");
}
}
out.close();
}
catch( FileNotFoundException filenotfoundexxption )
{
System.out.println( "a.txt, does not exist" );
}
catch( IOException ioexception )
{
ioexception.printStackTrace( );
}
}
}
Tak jsem to nakonec vyresil malym programkem v Javě. Diky vsem za snahu a hlavne tobe Javo!