Tengo un archivo f
y necesito afectar en un FileInputStream
fs
:¿Cómo puede un FileInputStream obtener el contenido de File?
File f = new File("C:/dir/foo.txt");
FileInputStream fs = (FileInputStream)f;
Pero me sale este error:
Cannot cast from File to FileInputStream
¿Cómo puede fs
obtener el contenido de f
?