Not sure I am understanding this correctly, but I was thinking that when I need to store a file content as a byte array in Java, I need to provide Java with the encoding of the file.
If I want to do it with a ready for example, I'll need to do something like:
Reader reader = Files.newBufferedReader(myFilePath, StandardCharsets.ISO_8859_1)
Why can't I specify the encoding the the file when using Files.readAllBytes(myFilePath)?
I'd like to do something like Files.readAllBytes(myFilePath, StandardCharsets.ISO_8859_1).
Am I getting this wrong?