package com.haxademic.core.data;

public class ConvertUtil {
	
	// from string

	public static int stringToInt( String str ) {
		return Integer.parseInt( str );
	}
	
	public static float stringToFloat( String str ) {
		return Float.valueOf( str );
	}
	
	public static boolean stringToBoolean( String bool ) {
		return (bool.equals("true")) ? true : false;
	}
	
	// to string

	public static String intToString( int number ) {
		return Integer.toString( number );
	}
	
	public static String floatToString( float number ) {
		return Float.toString( number );
	}
	
	// bytes
	
	public static byte intToByte( int number ) {
		return (byte) number;
	}
	
	public static int byteToInt( byte b ) {
		return b & 0xFF;	// returns an unsigned int
	}
	
}




@@ -734,13 +734,101 @@
 nt%0A%09%7D%0A%09%0A
+%09public static String byteArrayToString( byte%5B%5D data ) %7B%0A%09%09return new String(data);%0A%09%7D%0A%0A
 %7D%0A%0A%0A%0A

Update ConvertUtil.java