As I understand your question, you have two separate, and valid, midi streams, and you wish to merge these two streams into one. Where are the two streams from? What is createing them? Are they valid/complete midi streams?
A midi stream will usually contain at least some timing data. This cannot be merely merged. The midi data will contain midi messages, many of which will comprise multiple bytes of data, and these cannot be mixed up.
Logically, a process to merge the streams will need to separate the timing data out, separate each individual midi message, send on the midi messages, and create new timing data for the complete new stream. This is not a trivial task.
If you could provide an example of the sort of data you're talking about, both streams, I may be able to tell you more.
Geoff