added java snippet for BufferedReader