reader converted to inputstream