MD2 loader

Hello guys i’m trying to implementing a md2 loader in java, inspired in this tutorial:

http://tfc.duke.free.fr/old/models/md2.htm

its in c++ and i´m trying to convert to java.

So the question is to verify if is a md2 file
i need to check the ident which is “IDP2”
and i´m doing in the following way:

private static boolean isMD2File(MD2Header header) {
		if ((String.valueOf(header.ident) != MD2_IDENT)
				&& (header.version != MD2_VERSION)) {
			System.err.println("Not a MD2 file");
			return false;
		}
		return true;
	}

I defined the contant:

private static final String MD2_IDENT = "IPD2";

So after reading the header i transform the header.ident to a string then i compare with my constant.
i want to know if it’s the right way to do this.
Thanks.