Hi,
I have the following code:
//-----
1 public static
String leer(BufferedReader sin) {
2 StringBuffer line = new StringBuffer();
3
4 try {
5
6 for (int ch; (ch = sin.read()) != 1; ){
7 line.append(ch);
8 }
9
10 } catch (IOException e) {
11 System.out.println("leer: " + e.toString());
12 }
13 if (linea != null)
14 System.out.println(line.substring(0));
15 return line.substring(0);
16 }
//-----
The problem is, at line 6, "sin.read()" returns a int (which is a unicode code) and I need the equivalent character to build a string. How can I obtain the character that corresponds to this unicode code?
Thanks in advance.