@Override
  public int encode(AxdrByteArrayOutputStream axdrOStream) throws IOException {

    int codeLength;

    if (code != null) {
      codeLength = code.length;
      for (int i = code.length - 1; i >= 0; i--) {
        axdrOStream.write(code[i]);
      }
    } else {
      codeLength = 0;
      codeLength += access_parameters.encode(axdrOStream);

      codeLength += access_selector.encode(axdrOStream);
    }

    return codeLength;
  }
 public void encodeAndSave(int encodingSizeGuess) throws IOException {
   AxdrByteArrayOutputStream axdrOStream = new AxdrByteArrayOutputStream(encodingSizeGuess);
   encode(axdrOStream);
   code = axdrOStream.getArray();
 }