C
Chameleon
I want a small piece of code (for mobile) which reads entile file
"file.txt" from JAR and store it to a string.
"file.txt" has unicode format (2 bytes for every char)
The following code does not work:
---------------------------------
String s = null;
try {
DataInputStream dis = new
DataInputStream(LanguageLoader.class.getResourceAsStream("file.txt"));
s = dis.DataInputStream.readUTF();
} catch(Exception e) {
}
return s;
---------------------------------
"file.txt" from JAR and store it to a string.
"file.txt" has unicode format (2 bytes for every char)
The following code does not work:
---------------------------------
String s = null;
try {
DataInputStream dis = new
DataInputStream(LanguageLoader.class.getResourceAsStream("file.txt"));
s = dis.DataInputStream.readUTF();
} catch(Exception e) {
}
return s;
---------------------------------