I'm trying to read a file using the known 'read' method by the FileInputStream
class into a certain byte[]
buffer with a specific size (e.g 1024). Right after filling that buffer I'd like to validate it's characters (lets say one by one) but I don't want to convert it to a String (or use regex) since I might lose data.
Could anyone advice me what's the best way doing that specific validation?
Note: I know I can use Character.isLetter
and such methods but I'm not sure how to iterate that buffer.