Hi,
I want to use Greek Font on the Canvas, and I send a String (in Greek) to the setText() method. But I get
an EOFException . Here is the code:
public void setText(String text) {
try {
byte[] gText = text.getBytes();
ByteArrayInputStream bis = new ByteArrayInputStream(gText);
DataInputStream dis = new DataInputStream(bis);
int i = gText.length;
while (i != -1) {
// I get here the EOFException
System.out.println(dis.readUTF());
}
bis.close();
dis.close();
}
catch(EOFException ex) {
db("CIProduct EOFException " + ex.toString());
}
catch(UnsupportedEncodingException ueex) {
db("CIProduct UnsupportedEncodingException " + ueex.toString());
}
catch(IOException ioe) {
db("CIProduct IOException " + ioe.toString());
}
}
How can I use readUTF() to display the Greek fonts on the canvas?
Can anyone help me?
Thanx...

Reply With Quote

