Buffer char stream with scanner example