Code example for Scanner

Methods: hasNextLine

        scan = new Scanner(inputStream);
    public boolean hasNext() { 
        return scan != null && scan.hasNextLine();
    public DataSetLine getNext(DataSetLine buffer) {
        if (scan == null) {
            throw new NullPointerException("Did not open an input for this DataSetReader.");
        String line = scan.nextLine();
        if (line.length() == 0)
            return null; //Empty line 
        if (buffer == null) 
Connect your IDE to all the code out there  Get Codota for Java