add BufferedStream to improve performance and xml data:direction