Sure.
Basically I call the dungeon generator with the rows, columns, rooms ("features"), and "specials". I create a list of lists of ints, all 0. The values I use are:
0: can't walk
1: can walk
2: start
3: exit
4: "special" (item)
So I have a grid of values, and I just create the specified number of "features" (which are random rectangles, between 2 and 6 units wide/tall). As I am creating features, I keep track of which features are the farthest apart. This is where I'll place the start and end points.
After I create all the features, I go through each one like a linked list, and conect each one together (using a very simple "go x cells over, and y cells up/down (actually this is random, and will either go x/y or y/x, just to give it some randomness)")
Then I place the start and end points (in the farthest apart rooms, just so you dont randomly spawn right next to the exit. although this wouldn't be so bad, since you have to collect the treasure first. I did this part before I had items at all.)
At the very end I just pick random open spaces, and make them items.
This is just the dungeon generator part (I tried to make it reusable so this class only generates the grid of numbers). My "World" class then actually creates all the "game" related stuff.
http://snipplr.com/view/18189/random-dungeon-generator/