Code example for Scanner

Methods: hasNextLine

0
        scan = new Scanner(inputStream);
    } 
 
    @Override 
    public boolean hasNext() { 
        return scan != null && scan.hasNextLine();
    } 
 
    @Override 
    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)