When you use the bufferedreader class, you must import the java.io package into your program. It is an API that comes with Java which is aimed at reading and writing data (input and output). ... For instance, read data from a file and write to a file or write a response back over the network. The Java IO API is located in the Java IO package ( java.io ).