public byte[] getFlvHeaderBytes() {
int fpos = 0;
int typeFlags = 0;
if (containsAudio) typeFlags += 4;
if (containsVideo) typeFlags++;
ByteHelper bh = ioh.getByteHelper();
byte flv[] = (new String("FLV")).getBytes();
byte typ[] = bh.getUintBytes(1, 1);
byte typFlag[] = bh.getUintBytes(typeFlags, 1);
byte extDataLen[] = bh.getUintBytes(9 + extraData.length(), 4);
byte extData[] = extraData.getBytes();
byte flvhBytes[] = new byte[flv.length + typ.length + typFlag.length + extDataLen.length + extData.length];
System.arraycopy(flv, 0, flvhBytes, 0, flv.length);
fpos += flv.length;
System.arraycopy(typ, 0, flvhBytes, fpos, typ.length);