public static byte[] getAvpAsGrouped(int avpCode, AvpSet set) { try { Avp avp = set.getAvp(avpCode); return avp != null ? avp.getRawData() : null; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " as type Grouped.", e); } return null; } }
public static byte[] getAvpAsGrouped(int avpCode, AvpSet set) { try { Avp avp = set.getAvp(avpCode); return avp != null ? avp.getRawData() : null; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " as type Grouped.", e); } return null; } }
public static byte[] getAvpAsGrouped(int avpCode, long vendorId, AvpSet set) { try { Avp avp = set.getAvp(avpCode, vendorId); return avp != null ? avp.getRawData() : null; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " and Vendor-Id " + vendorId + " as type Grouped.", e); } return null; } }
public static byte[] getAvpAsGrouped(int avpCode, long vendorId, AvpSet set) { try { Avp avp = set.getAvp(avpCode, vendorId); return avp != null ? avp.getRawData() : null; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " and Vendor-Id " + vendorId + " as type Grouped.", e); } return null; } }
public static byte[][] getAvpsAsGrouped(int avpCode, long vendorId, AvpSet set) { try { AvpSet avpSet = set.getAvps(avpCode, vendorId); byte[][] values = new byte[avpSet.size()][]; int i = 0; for(Avp avp : avpSet) { values[i++] = avp.getRawData(); } return values; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " and Vendor-Id " + vendorId + " as type Grouped.", e); } return new byte[0][]; } }
public static byte[][] getAvpsAsGrouped(int avpCode, AvpSet set) { try { AvpSet avpSet = set.getAvps(avpCode); byte[][] values = new byte[avpSet.size()][]; int i = 0; for(Avp avp : avpSet) { values[i++] = avp.getRawData(); } return values; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " as type Grouped.", e); } return new byte[0][]; } }
public static byte[][] getAvpsAsGrouped(int avpCode, AvpSet set) { try { AvpSet avpSet = set.getAvps(avpCode); byte[][] values = new byte[avpSet.size()][]; int i = 0; for(Avp avp : avpSet) { values[i++] = avp.getRawData(); } return values; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " as type Grouped.", e); } return new byte[0][]; } }
public static byte[][] getAvpsAsGrouped(int avpCode, long vendorId, AvpSet set) { try { AvpSet avpSet = set.getAvps(avpCode, vendorId); byte[][] values = new byte[avpSet.size()][]; int i = 0; for(Avp avp : avpSet) { values[i++] = avp.getRawData(); } return values; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " and Vendor-Id " + vendorId + " as type Grouped.", e); } return new byte[0][]; } }
public static Object[] getAvpsAsCustom(int avpCode, long vendorId, AvpSet set, Class clazz) { try { AvpSet avpSet = set.getAvps(avpCode, vendorId); Object array = Array.newInstance(clazz, avpSet.size()); int i = 0; AvpRepresentation rep = AvpDictionary.INSTANCE.getAvp(avpCode, vendorId); Constructor c = clazz.getConstructor(int.class, long.class, int.class, int.class, byte[].class); for(Avp avp : avpSet) { Array.set(array, i++, c.newInstance(rep.getCode(), rep.getVendorId(), rep.getRuleMandatoryAsInt(), rep.getRuleProtectedAsInt(), avp.getRawData())); } return (Object[]) array; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " and Vendor-Id " + vendorId + " as type Custom (Class '" + clazz.getName() + "').", e); } return (Object[]) Array.newInstance(clazz, 0); } }
public static Object[] getAvpsAsCustom(int avpCode, long vendorId, AvpSet set, Class clazz) { try { AvpSet avpSet = set.getAvps(avpCode, vendorId); Object array = Array.newInstance(clazz, avpSet.size()); int i = 0; AvpRepresentation rep = AvpDictionary.INSTANCE.getAvp(avpCode, vendorId); Constructor c = clazz.getConstructor(int.class, long.class, int.class, int.class, byte[].class); for(Avp avp : avpSet) { Array.set(array, i++, c.newInstance(rep.getCode(), rep.getVendorId(), rep.getRuleMandatoryAsInt(), rep.getRuleProtectedAsInt(), avp.getRawData())); } return (Object[]) array; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " and Vendor-Id " + vendorId + " as type Custom (Class '" + clazz.getName() + "').", e); } return (Object[]) Array.newInstance(clazz, 0); } }
public static Object getAvpAsCustom(int avpCode, long vendorId, AvpSet set, Class clazz) { try { Avp avp = set.getAvp(avpCode, vendorId); if (avp != null) { AvpRepresentation rep = AvpDictionary.INSTANCE.getAvp(avpCode, vendorId); Constructor c = null; c = clazz.getConstructor(int.class, long.class, int.class, int.class, byte[].class); return c.newInstance(rep.getCode(), rep.getVendorId(), rep.getRuleMandatoryAsInt(), rep.getRuleProtectedAsInt(), avp.getRawData()); } } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " and Vendor-Id " + vendorId + " as type Custom (Class '" + clazz.getName() + "').", e); } } return null; }
public static Object getAvpAsCustom(int avpCode, long vendorId, AvpSet set, Class clazz) { try { Avp avp = set.getAvp(avpCode, vendorId); if (avp != null) { AvpRepresentation rep = AvpDictionary.INSTANCE.getAvp(avpCode, vendorId); Constructor c = null; c = clazz.getConstructor(int.class, long.class, int.class, int.class, byte[].class); return c.newInstance(rep.getCode(), rep.getVendorId(), rep.getRuleMandatoryAsInt(), rep.getRuleProtectedAsInt(), avp.getRawData()); } } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " and Vendor-Id " + vendorId + " as type Custom (Class '" + clazz.getName() + "').", e); } } return null; }
public static Object[] getAvpsAsCustom(int avpCode, AvpSet set, Class clazz) { try { AvpSet avpSet = set.getAvps(avpCode); Object array = Array.newInstance(clazz, avpSet.size()); int i = 0; Constructor c = clazz.getConstructor(int.class, long.class, int.class, int.class, byte[].class); AvpRepresentation rep = null; for(Avp avp : avpSet) { rep = AvpDictionary.INSTANCE.getAvp(avpCode, avp.getVendorId()); Array.set(array, i++, c.newInstance(rep.getCode(), rep.getVendorId(), rep.getRuleMandatoryAsInt(), rep.getRuleProtectedAsInt(), avp.getRawData())); } return (Object[]) array; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " as type Custom (Class '" + clazz.getName() + "').", e); } return (Object[]) Array.newInstance(clazz, 0); } }
public static Object[] getAvpsAsCustom(int avpCode, AvpSet set, Class clazz) { try { AvpSet avpSet = set.getAvps(avpCode); Object array = Array.newInstance(clazz, avpSet.size()); int i = 0; Constructor c = clazz.getConstructor(int.class, long.class, int.class, int.class, byte[].class); AvpRepresentation rep = null; for(Avp avp : avpSet) { rep = AvpDictionary.INSTANCE.getAvp(avpCode, avp.getVendorId()); Array.set(array, i++, c.newInstance(rep.getCode(), rep.getVendorId(), rep.getRuleMandatoryAsInt(), rep.getRuleProtectedAsInt(), avp.getRawData())); } return (Object[]) array; } catch (Exception e) { if(logger.isDebugEnabled()) { logger.debug("Failed to obtain AVP with code " + avpCode + " as type Custom (Class '" + clazz.getName() + "').", e); } return (Object[]) Array.newInstance(clazz, 0); } }