Should I buffer the InputStream or the InputStreamReader?
r1 is more efficient. The InputStreamReader itself doesn’t have a large buffer. The BufferedReader can be set to have a larger buffer than InputStreamReader. The InputStreamReader in r2 would act as a bottleneck. In a nut: you should read the data through a funnel, not through a bottle. Update: here’s a little benchmark program, just … Read more