public class ArchiveFileTest
{
	static final String [] s = {
		"4D61696C313033333330333433393932382D333139.Repository0.FileStreamStore",
		"4D61696C313033333330383937333234372D343035.Repository0.FileStreamStore",
		"4D61696C313033333331323031343933352D343437.Repository0.FileStreamStore",
	};

	public static String toAscii(String hexString)
	{
		if((hexString.length() % 2) != 0)
		{
			throw new RuntimeException("String not comprised of Hex digit pairs.");
		}
		char[] chars = new char[hexString.length()];
		char[] convChars = new char[hexString.length()/2];
		hexString.getChars(0, hexString.length(), chars, 0);
		StringBuffer buff = new StringBuffer();
		for(int i=0;i<hexString.length();i+=2)
		{
			String hexToken = new String(chars, i, 2);
			// System.out.println(hexToken);
			convChars[i/2] = (char)Integer.parseInt(hexToken, 16);
		}
		return new String(convChars);
	}

	public static String toHexString(String asciiString)
	{
		char[] ascii = new char[asciiString.length()];
		asciiString.getChars(0,asciiString.length(), ascii, 0);
		StringBuffer hexBuff = new StringBuffer();
		for(int i=0;i<asciiString.length();i++)
		{
			hexBuff.append(Integer.toHexString((int)ascii[i]));
		}
		return hexBuff.toString().toUpperCase();
	}

	static public void f(String s)
	{
		String name = s.substring(0, s.indexOf('.'));
		System.out.println("name:	 " + name);
		System.out.println("toAscii: " + toAscii(name));
	}

	static public void main(String[] args)
	{
		for (int i = 0 ; i < s.length ; i++) f(s[i]);
	}
}
