When moss is used as a carpet, it's usually tied to stainless steel mesh with nylon string.
When tied to driftwood or non-smooth stone, cotton string can be used.
I have also used flat river rock by using an unraveled bath loofah. When stretched out and wrapped over a stone, it's like a thin mesh where the moss fronds will grow out from.
If you haven't purchased the moss already, I'd encourage you to go with a different moss than java (my least favorite). The growth is very erratic. Mosses like flame or mini Xmas have a better effect.