org.jnbt
Class NBTUtils

java.lang.Object
  extended by org.jnbt.NBTUtils

public final class NBTUtils
extends Object

A class which contains NBT-related utility methods.

Author:
Graham Edgecombe

Method Summary
static Class<? extends Tag> getTypeClass(int type)
          Gets the class of a type of tag.
static int getTypeCode(Class<? extends Tag> clazz)
          Gets the type code of a tag class.
static String getTypeName(Class<? extends Tag> clazz)
          Gets the type name of a tag.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTypeName

public static String getTypeName(Class<? extends Tag> clazz)
Gets the type name of a tag.

Parameters:
clazz - The tag class.
Returns:
The type name.

getTypeCode

public static int getTypeCode(Class<? extends Tag> clazz)
Gets the type code of a tag class.

Parameters:
clazz - The tag class.
Returns:
The type code.
Throws:
IllegalArgumentException - if the tag class is invalid.

getTypeClass

public static Class<? extends Tag> getTypeClass(int type)
Gets the class of a type of tag.

Parameters:
type - The type.
Returns:
The class.
Throws:
IllegalArgumentException - if the tag type is invalid.