Is it a bug
package com.codegym.task.task18.task1801;
import java.io.FileInputStream;
import java.io.*;
/*
Maximum byte
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String filename = reader.readLine();
FileInputStream inputStream = new FileInputStream("D:/s.txt");
long sum =0;
while (inputStream.available() > 0) //as long as there are unread bytes
{
int data = inputStream.read(); //Read the next byte
if(data>sum){
sum=data;
} //Add it to the running total
}
inputStream.close(); // Close the stream
System.out.println(sum); // Display the sum on the screen.
}
}