net.jradius.packet
Class Format
java.lang.Object
net.jradius.packet.Format
- Direct Known Subclasses:
- DHCPFormat, DiameterFormat, RadiusFormat
public abstract class Format
- extends java.lang.Object
- Author:
- David Bird
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Format
public Format()
packAttribute
public abstract void packAttribute(java.io.OutputStream out,
RadiusAttribute a)
throws java.io.IOException
- Throws:
java.io.IOException
unpackAttributeHeader
public abstract int unpackAttributeHeader(java.io.InputStream in,
Format.AttributeParseContext ctx)
throws java.io.IOException
- Throws:
java.io.IOException
packAttributeList
public byte[] packAttributeList(AttributeList attrs)
- Packs an AttributeList into a byte array
- Parameters:
attrs
- The AttributeList to pack
- Returns:
- Returns the packed AttributeList
unpackAttributes
public void unpackAttributes(AttributeList attrs,
byte[] bytes,
int bOffset,
int bLength)
- Unpacks RadiusAttributes from a byte array into an AttributeList
- Parameters:
attrs
- The AttributeList to put unpacked attributesbytes
- The bytes to be unpackedbLength
- The length of the bytes to be unpacked
readUnsignedInt
public static long readUnsignedInt(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
readUnsignedShort
public static int readUnsignedShort(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
readUnsignedByte
public static int readUnsignedByte(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
writeUnsignedByte
public static void writeUnsignedByte(java.io.OutputStream out,
int b)
throws java.io.IOException
- Throws:
java.io.IOException
writeUnsignedShort
public static void writeUnsignedShort(java.io.OutputStream out,
int s)
throws java.io.IOException
- Throws:
java.io.IOException
writeUnsignedInt
public static void writeUnsignedInt(java.io.OutputStream out,
long i)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2008 JRadius Project, All Rights Reserved.