protected byte[] getAttributeBytes()
throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream(MAX_PACKET_LENGTH);
for (Iterator i = attributes.iterator(); i.hasNext();) {
RadiusAttribute a = (RadiusAttribute)i.next();
bos.write(a.writeAttribute());
}
bos.flush();
return bos.toByteArray();
}