Class Attributes

java.lang.Object
org.tinyradius.attribute.util.Attributes

public class Attributes
extends java.lang.Object
Helper class to create and extract attributes.
  • Method Summary

    Modifier and Type Method Description
    static RadiusAttribute create​(Dictionary dictionary, int vendorId, byte type, byte[] data)
    Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
    static RadiusAttribute create​(Dictionary dictionary, int vendorId, byte type, java.lang.String data)
    Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
    static java.util.List<RadiusAttribute> extractAttributes​(Dictionary dictionary, int vendorId, byte[] data, int pos)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static RadiusAttribute create​(Dictionary dictionary, int vendorId, byte type, byte[] data)
      Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
      Parameters:
      dictionary - Dictionary to use
      vendorId - vendor ID or -1
      type - attribute type
      data - attribute data as byte array
      Returns:
      RadiusAttribute object
    • create

      public static RadiusAttribute create​(Dictionary dictionary, int vendorId, byte type, java.lang.String data)
      Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
      Parameters:
      dictionary - Dictionary to use
      vendorId - vendor ID or -1
      type - attribute type
      data - attribute data as String
      Returns:
      RadiusAttribute object
    • extractAttributes

      public static java.util.List<RadiusAttribute> extractAttributes​(Dictionary dictionary, int vendorId, byte[] data, int pos)
      Parameters:
      dictionary - dictionary to create attribute
      vendorId - vendor Id to set attributes
      data - byte array to parse
      pos - position in byte array at which to parse
      Returns:
      list of RadiusAttributes