Input/Output Learning Mode

How do you create a custom stream handler?