How to create a custom ResultSet?

I saw in the docs and some posts (like http://forums.smartclient.com/showpost.php?p=762&postcount=4) that it’s possible to customize the resultset class used by a datasource.

I read the following in the resultset javadocs, but I didn’t understand.

So could any of you please give me an example of how to do that? I need a custom datasource so that I can pass extra parameters to fetch operation.

Thanks,
Matheus