parse();
}
public static Skin getSkin(Resource res, Application app) throws IOException {
String encoding = app.getProperty("skinCharset");
Reader reader;
if (encoding == null) {
reader = new InputStreamReader(res.getInputStream());
} else {
reader = new InputStreamReader(res.getInputStream(), encoding);
}
int length = (int) res.getLength();
char[] characterBuffer = new char[length];
int read = 0;
try {
while (read < length) {
int r = reader.read(characterBuffer, read, length - read);
if (r == -1)
break;
read += r;
}
} finally {
reader.close();
}
return new Skin(characterBuffer, read, app);
}