public byte[] toByteArray() throws IOException {
ByteArrayWriter baw = new ByteArrayWriter();
baw.write(SSH_AGENT_CONSTRAINT_TIMEOUT);
baw.writeUINT32(timeout);
baw.write(SSH_AGENT_CONSTRAINT_USE_LIMIT);
baw.writeUINT32(uselimit);
baw.write(SSH_AGENT_CONSTRAINT_FORWARDING_STEPS);
baw.writeUINT32(maxsteps);
baw.write(SSH_AGENT_CONSTRAINT_FORWARDING_PATH);
baw.writeString(forwardingpath);
baw.write(SSH_AGENT_CONSTRAINT_SSH1_COMPAT);