He asked whether "you guys just drive around in modified electric vehicles and pose for photos," referring to an image Mr. Dotcom, 38, had just posted showing three of his associates with golf buggies and a Segway. "I could live like that," Mr. Gracewood wrote.
Twenty minutes later he got a surprising response: "Come over now!" So he took a friend and went to the most expensive house in the country - a mansion worth 30 million New Zealand dollars, or $24 million, rented by Mr. Dotcom, a German citizen - for a swim and some cupcakes. Twitter users across New Zealand watched with fascination as the group posted updates and photos of the visit.
That evening, which was followed on Twitter under #swimatkims , was just the latest in a series of at times bizarre developments in a case that has turned Mr. Dotcom into something of a cult hero since his arrest.
In January, two police helicopters landed on his lawn to raid the property just north of Auckland. At that time, most of the country had never heard of Mr. Dotcom, despite his flamboyance and wealth. He had kept a low profile in the two years he had been living in this country of about 4.4 million people.
The police operation - carried out under New Zealand's extradition treaty with the United States - seemed designed to attract attention. It was accompanied by uncharacteristically detailed news releases describing the operation, including how officers had cut their way into a panic room to arrest Mr. Dotcom, who, they said, was found sitting near a shotgun.
Mr. Dotcom - born Kim Schmitz and also known as Kimble and Kim Tim Jim Vestor - and three others connected with Megaupload were arrested in connection with U.S. indictments on charges involving copyright infringement and money laundering. At the time, the U.S. Department of Justice said that in all, seven people had been arrested around the world in connection with an investigation into online piracy of numerous copyrighted works, including music and films.
The Justice Department said the individuals and two companies - Megaupload and Vestor - had been charged with "engaging in a racketeering conspiracy, conspiring to commit copyright infringement, conspiring to commit money laundering and two substantive counts of criminal copyright infringement."
This month, Mr. Dotcom's U.S. lawyers are set to appear before a Virginia judge in a bid to have the criminal case against the company dismissed. According to a document on his lawyers' Web site, they will argue, among other points, that the indictments are invalid because they must be submitted to a company's U.S. office, which Megaupload has never had.
Even if it is successful, the case against Mr. Dotcom and the other defendants would proceed.
The four men arrested in New Zealand are still free on bail, awaiting an extradition hearing, which is scheduled to begin Aug. 6.
Mr. Dotcom has had other brushes with the law. He was convicted of insider trading in Germany in 2002 in what was at the time the largest such case.
Among the items seized by the police in the January raids were 18 luxury vehicles worth 6 million dollars - including a Rolls Royce Phantom Drophead Coupe and a 1959 pink Cadillac - computers and as much as 11 million dollars in cash.
Mr. Dotcom said in an e-mail interview that he had been treated badly by the New Zealand police and the government, which he said he believed was simply kowtowing to U.S. requests.
"Two helicopters and 76 heavily armed officers to arrest a man alleged of copyright crimes - think about that," he wrote. "Hollywood is importing their movie scripts into the real world and sends armed forces to protect their outdated business model."
In February, the New Zealand police defended the operation, saying it had been in line with a risk assessment and there had been only "20 or 30" officers involved in the raid on the mansion.
After a month of prison, Mr. Dotcom was eventually granted bail, despite prosecutors' arguments that he was a serious flight risk. Over the following months his lawyers won a series of hearings to loosen the bail conditions and free up some of his confiscated cash to cover expenses.
The biggest victory came last Thursday, when a High Court judge ruled the New Zealand police had used the wrong type of search warrant, so the entire raid had been illegal. Mr. Dotcom's lawyers are due back in the Auckland High Court on Wednesday, seeking the return of seized assets and data.
Gavin Ellis, a senior political studies lecturer at the University of Auckland, said that over time the public had become less supportive of the police operation.
"Initially there was a sort of a 'gee, whiz' reaction. 'Wow, look what the police have done, they've got this alleged master criminal,"' Mr. Ellis said. "But then, as the media perception of him and the media portrayal of him changed, looking backward those things started to look heavy-handed."
While Mr. Dotcom's lawyers were making steady progress in court, Mr. Dotcom was gaining the public's favor. A headline on the news Web site Stuff.co.nz in May read, "Dotcom's straight talk wins over Kiwis."
"There's been a clear shift in the characterization of him, from this assumed criminality or alleged criminality, to a cult hero," Mr. Ellis said.
Mr. Dotcom gave his first television interview in March to the national current-affairs show "Campbell Live," which dedicated its full half-hour program to the topic. He appeared affable and composed, speaking articulately in near-perfect English, with a German accent that was noticeable but not strong.
During that interview he described the U.S. indictment against him as "nothing more than a press release filled with things out of context, designed to make me look as bad as possible."
Speaking by e-mail on Monday, Mr. Dotcom said he was a "larger than life character," but he said he had not sought fame or notoriety.
"The people of New Zealand have made my family and me feel very welcome," he wrote. "They know that I have been treated unfairly. They know that the N.Z. leadership does anything to please the United States."
"I used to respect the United States and the American dream," he said. "Now I consider the United States the biggest threat to Internet freedom and peace in the world."
Three months after his arrest, Mr. Dotcom gained more public approval when he waded into the political arena himself.
He disclosed a donation of 50,000 dollars that he had made to a right-leaning member of Parliament, John Banks, during Mr. Banks's failed 2010 campaign for mayor of Auckland. Mr. Dotcom said Mr. Banks had phoned to thank him for the contribution, despite the donation's listing as anonymous.
The political storm that followed dominated the news for several days and threatened to upset the country's coalition government, of which Mr. Banks is a small but strategically important part.
All of this worked in Mr. Dotcom's favor as well, Dr. Ellis believed, because many people "love to hate" Mr. Banks and his party.
Mr. Banks's press secretary, Shelley Mackey, said he maintained that the donations had been anonymous, that he had adhered to the law, and that he was looking forward to the outcome of a police investigation into the matter.
But Mr. Dotcom said by e-mail he had considered Mr. Banks a friend and he wished the political fracas had never happened.
"In terms of changing the perception of Kim Dotcom, you couldn't pick a better politician," Dr. Ellis said. "It's all fitted into the increasing legitimization of Kim Dotcom, or the acceptability of Kim Dotcom. It was almost as if the gods were smiling on him," he added.
Until recently, Mr. Dotcom was forbidden to use the Internet under his bail conditions.
After the court granted him access he began using Twitter on June 19, amassing more than 46,000 followers in just two weeks. John Key, New Zealand's prime minister, has about 52,000.
Mr. Dotcom has become a prolific user of social media, posting photos of his family as well as mocking the police operation and the legal case against him.
He has also used Twitter and his newly relaxed bail conditions to increase his public profile, posting photos of himself at a popular concert, at the screening of a television show and attending a protest march against the closure of a state-financed television channel.
Asked why he had become so active online, Mr. Dotcom said he was using the most efficient way to respond to all the good-will messages he had received.
The day after #swimatkims, Mr. Dotcom said in a Twitter post that the event would return for "everybody."
"Need a big public pool," he said. "Awesome DJ. Sound & lights. Who's in?"
Copyright 2012 The New York Times