Hello, can someone explain me how can I read only the first 10 characters of the file? This is my current code, but it reads all the characters..

while (fis.read(dataArray) != -1) {
collected = new String(dataArray);
}