dout.writeInt(addr);
byte[] buffer = addr.getAddress(); for (int i = 0; i < buffer.length; i++) { dout.writeByte(buffer[i]); }
        private byte[] toByteArray() {            try {                ByteArrayOutputStream bout = new ByteArrayOutputStream();                DataOutputStream dout = new DataOutputStream(bout);                dout.write(name.getBytes("UTF8"));                dout.writeShort(type);                dout.writeShort(clazz);                //dout.writeInt(len);                dout.writeInt(addr);                dout.close();                return bout.toByteArray();            } catch (IOException e) {                throw new InternalError();            }        }