public int encode(OutputStream os) throws IOException {
  int retVal=1 + mechOidBytes.length;
  os.write(TOKEN_ID);
  int length=mechOidBytes.length + mechTokenLength;
  retVal+=putLength(length,os);
  os.write(mechOidBytes);
  return retVal;
}

public int encode ( OutputStream os ) throws IOException { int retVal = 1 + mechOidBytes . length ; os . write ( TOKEN_ID ) ; int length = mechOidBytes . length + mechTokenLength ; retVal += putLength ( length , os ) ; os . write ( mechOidBytes ) ; return retVal ; }
encodes this gssheader instance onto the provided outputstream .
