public static boolean isStanza(Packet packet){
  if (packet instanceof Message)   return true;
  if (packet instanceof IQ)   return true;
  if (packet instanceof Presence)   return true;
  return false;
}

public static boolean isStanza ( Packet packet ) { if ( packet instanceof Message ) return true ; if ( packet instanceof IQ ) return true ; if ( packet instanceof Presence ) return true ; return false ; }
returns true if the packet is a stanza as defined in rfc - 6121 - a message , iq or presence packet .
