91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 370KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-14
  • 語言: 其他
  • 標簽: radius??

資源簡介

tinyRadius封裝,官方源碼和的test測試代碼

資源截圖

代碼片段和文件信息

/**
?*?$Id:?IntegerAttribute.javav?1.4?2005/09/04?22:11:03?wuttke?Exp?$
?*?Created?on?08.04.2005
?*?@author?Matthias?Wuttke
?*?@version?$Revision:?1.4?$
?*/
package?org.tinyradius.attribute;

import?org.tinyradius.dictionary.AttributeType;
import?org.tinyradius.util.RadiusException;

/**
?*?This?class?represents?a?Radius?attribute?which?only
?*?contains?a?32?bit?integer.
?*/
public?class?IntegerAttribute?extends?RadiusAttribute?{

/**
?*?Constructs?an?empty?integer?attribute.
?*/
public?IntegerAttribute()?{
super();
}

/**
?*?Constructs?an?integer?attribute?with?the?given?value.
?*?@param?type?attribute?type
?*?@param?value?attribute?value
?*/
public?IntegerAttribute(int?type?int?value)?{
setAttributeType(type);
setAttributeValue(value);
}

/**
?*?Returns?the?string?value?of?this?attribute.
?*?@return?a?string
?*/
public?int?getAttributeValueInt()?{
byte[]?data?=?getAttributeData();
return?(((data[0]?&?0x0ff)?< ((data[2]?&?0x0ff)?< }

/**
?*?Returns?the?value?of?this?attribute?as?a?string.
?*?Tries?to?resolve?enumerations.
?*?@see?org.tinyradius.attribute.RadiusAttribute#getAttributeValue()
?*/
public?String?getAttributeValue()?{
int?value?=?getAttributeValueInt();
AttributeType?at?=?getAttributeTypeobject();
if?(at?!=?null)?{
String?name?=?at.getEnumeration(value);
if?(name?!=?null)
return?name;
}

return?Integer.toString(value);
}

/**
?*?Sets?the?value?of?this?attribute.
?*?@param?value?integer?value
?*/
public?void?setAttributeValue(int?value)?{
byte[]?data?=?new?byte[4];
data[0]?=?(byte)(value?>>?24?&?0x0ff);
data[1]?=?(byte)(value?>>?16?&?0x0ff);
data[2]?=?(byte)(value?>>?8?&?0x0ff);
data[3]?=?(byte)(value?&?0x0ff);
setAttributeData(data);
}

/**
?*?Sets?the?value?of?this?attribute.
?*?@exception?NumberFormatException?if?value?is?not?a?number?and?constant?cannot?be?resolved
?*?@see?org.tinyradius.attribute.RadiusAttribute#setAttributeValue(java.lang.String)
?*/
public?void?setAttributeValue(String?value)?{
AttributeType?at?=?getAttributeTypeobject();
if?(at?!=?null)?{
Integer?val?=?at.getEnumeration(value);
if?(val?!=?null)?{
setAttributeValue(val.intValue());
return;
}
}

setAttributeValue(Integer.parseInt(value));
}

/**
?*?Check?attribute?length.
?*?@see?org.tinyradius.attribute.RadiusAttribute#readAttribute(byte[]?int?int)
?*/
public?void?readAttribute(byte[]?data?int?offset?int?length)
throws?RadiusException?{
if?(length?!=?6)
throw?new?RadiusException(“integer?attribute:?expected?4?bytes?data“);
super.readAttribute(data?offset?length);
}

}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-12-03?17:40??dist\
?????文件???????61441??2010-02-03?23:51??dist\TinyRadius-1.0.jar
?????目錄???????????0??2018-12-03?17:40??doc\
?????目錄???????????0??2018-12-03?17:40??doc\apidoc\
?????文件????????4038??2010-02-03?23:51??doc\apidoc\allclasses-frame.html
?????文件????????3558??2010-02-03?23:51??doc\apidoc\allclasses-noframe.html
?????文件???????20018??2010-02-03?23:51??doc\apidoc\constant-values.html
?????文件????????5940??2010-02-03?23:51??doc\apidoc\deprecated-list.html
?????文件???????10031??2010-02-03?23:51??doc\apidoc\help-doc.html
?????目錄???????????0??2018-12-03?17:40??doc\apidoc\index-files\
?????文件???????19219??2010-02-03?23:51??doc\apidoc\index-files\index-1.html
?????文件????????7503??2010-02-03?23:51??doc\apidoc\index-files\index-10.html
?????文件????????8124??2010-02-03?23:51??doc\apidoc\index-files\index-11.html
?????文件???????16179??2010-02-03?23:51??doc\apidoc\index-files\index-12.html
?????文件???????21556??2010-02-03?23:51??doc\apidoc\index-files\index-13.html
?????文件????????9763??2010-02-03?23:51??doc\apidoc\index-files\index-14.html
?????文件????????7624??2010-02-03?23:51??doc\apidoc\index-files\index-15.html
?????文件????????8310??2010-02-03?23:51??doc\apidoc\index-files\index-16.html
?????文件????????7340??2010-02-03?23:51??doc\apidoc\index-files\index-17.html
?????文件???????12607??2010-02-03?23:51??doc\apidoc\index-files\index-2.html
?????文件???????11917??2010-02-03?23:51??doc\apidoc\index-files\index-3.html
?????文件????????8511??2010-02-03?23:51??doc\apidoc\index-files\index-4.html
?????文件???????33187??2010-02-03?23:51??doc\apidoc\index-files\index-5.html
?????文件????????6918??2010-02-03?23:51??doc\apidoc\index-files\index-6.html
?????文件????????9080??2010-02-03?23:51??doc\apidoc\index-files\index-7.html
?????文件????????7370??2010-02-03?23:51??doc\apidoc\index-files\index-8.html
?????文件???????10112??2010-02-03?23:51??doc\apidoc\index-files\index-9.html
?????文件????????1528??2010-02-03?23:51??doc\apidoc\index.html
?????目錄???????????0??2018-12-03?17:40??doc\apidoc\org\
?????目錄???????????0??2018-12-03?17:40??doc\apidoc\org\tinyradius\
?????目錄???????????0??2018-12-03?17:40??doc\apidoc\org\tinyradius\attribute\
............此處省略137個文件信息

評論

共有 條評論