Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int getType(File file, String path){
- String typestring = getString(file, path);
- int type = 0;
- if(typestring.contains(":")){
- String[] typearray = typestring.split(":");
- try{
- type = Integer.parseInt(typearray[0]);
- } catch (NumberFormatException d) {
- }
- } else {
- try{
- type = Integer.parseInt(typestring);
- } catch (NumberFormatException d) {
- }
- }
- return type;
- }
- public static int getData(File file, String path){
- String typestring = getString(file, path);
- int data = 0;
- if(typestring.contains(":")){
- String[] typearray = typestring.split(":");
- try{
- data = Integer.parseInt(typearray[1]);
- } catch (NumberFormatException d) {
- }
- }
- return data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement