Greetings to all,
I have a problem again.
What I need is to read plain text file and represent its contents as
an array of bytes (byte[]) so that it could be passed to another
Java function (void setData(byte[] data)).
I have tried different approaches, but failed. (I have tried to
`read' it, but `read' reads only the first line of the file, with
read-line I am failing to `glue' the lines into a single one,
opening an output string and then (write-char (read-char infile)
outstr) causes a class cast exception).
What is the preferred/right way to read a whole file? Our, how would
you solve that task?
With best regards,