implement .net fx filestream