net.jradius.packet.attribute.value
Class IntegerValue

java.lang.Object
  extended by net.jradius.packet.attribute.value.AttributeValue
      extended by net.jradius.packet.attribute.value.IntegerValue
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DateValue, NamedValue, SignedValue

public class IntegerValue
extends AttributeValue

The Integer attribute value. Uses a Long as the underlying object since this is an unsigned long in RADIUS.

Author:
David Bird
See Also:
Serialized Form

Field Summary
protected  Long integerValue
           
protected  int length
           
 
Constructor Summary
IntegerValue()
           
IntegerValue(int i)
           
IntegerValue(Integer i)
           
IntegerValue(long l)
           
IntegerValue(Long l)
           
 
Method Summary
 void copy(AttributeValue value)
           
 void getBytes(ByteBuffer buffer)
           
 void getBytes(OutputStream out)
           
 int getLength()
           
 Long getValue()
           
 Serializable getValueObject()
           
static boolean isValid(long l)
           
 void setLength(int length)
           
 void setLong(Long l)
           
 void setValue(byte[] b)
           
 void setValue(byte[] b, int off, int len)
           
 void setValue(long l)
           
 void setValue(String v)
           
 void setValueObject(Serializable o)
           
 String toString()
           
 String toXMLString()
           
 
Methods inherited from class net.jradius.packet.attribute.value.AttributeValue
getBytes, getBytes, toDebugString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

length

protected int length

integerValue

protected Long integerValue
Constructor Detail

IntegerValue

public IntegerValue()

IntegerValue

public IntegerValue(Long l)

IntegerValue

public IntegerValue(Integer i)

IntegerValue

public IntegerValue(int i)

IntegerValue

public IntegerValue(long l)
Method Detail

copy

public void copy(AttributeValue value)
Specified by:
copy in class AttributeValue

getLength

public int getLength()
Overrides:
getLength in class AttributeValue

setLength

public void setLength(int length)

getBytes

public void getBytes(OutputStream out)
              throws IOException
Specified by:
getBytes in class AttributeValue
Throws:
IOException

getBytes

public void getBytes(ByteBuffer buffer)
Specified by:
getBytes in class AttributeValue

setValue

public void setValue(byte[] b)
Specified by:
setValue in class AttributeValue

setValue

public void setValue(byte[] b,
                     int off,
                     int len)
Specified by:
setValue in class AttributeValue

setValue

public void setValue(String v)
Overrides:
setValue in class AttributeValue

getValue

public Long getValue()

toString

public String toString()
Overrides:
toString in class AttributeValue

toXMLString

public String toXMLString()
Overrides:
toXMLString in class AttributeValue

setLong

public void setLong(Long l)

getValueObject

public Serializable getValueObject()
Overrides:
getValueObject in class AttributeValue

setValueObject

public void setValueObject(Serializable o)
Specified by:
setValueObject in class AttributeValue

setValue

public void setValue(long l)
              throws NumberFormatException
Throws:
NumberFormatException

isValid

public static boolean isValid(long l)


Copyright © 2011 Coova Technologies, LLC, All Rights Reserved.