else if ( data[loop].getClass().equals(Board.class) ) {
else if ( data[loop].getClass().equals(IBoard.class) ) {
    private static void encodeData( Packet packet, Writer out )        throws IOException    {        // Packet data encoding is based on data type.        Object[] data = packet.getData();        for ( int loop = 0; loop < data.length; loop++ ) {            if ( null == data[loop] ) {                out.write( "<null />" );            }            else if ( data[loop].getClass().equals(Integer.class) ) {                out.write( "<integer value=\"" );                out.write( data[loop].toString() );                out.write( "\" />" );            }            else if ( data[loop].getClass().equals(Board.class) ) {                BoardEncoder.encode( (Board) data[loop], out );            }        }    }