It's automatic, so you need not do anything. For instance, if an activex component has a method like get(ByteArray data), you just need to do as follows
Code:
var ss = new StringStream;
ss.put(1);
ss.put(2);
...
// ss will be converted to a ByteArray by swfkit automatically.
x.get(ss);