Added stream wrapper template class.