Pregunta

Is it possible to get an InputStream out of an InputStreamReader instance? If yes, how?

EDIT: i'm reading a binary file over network, so i need to read bytes, not chars. I haven't found a way to do this with an InputStreamReader....

¿Fue útil?

Solución

Not without reflection, no... and I really wouldn't recommend using reflection here. (You would be very implementation-specific.)

Usually you shouldn't care about which implementation of Reader is being used at all, so you wouldn't even know it was an InputStreamReader... let alone try to get access to the underlying InputStream.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top