package innovimax.mixthem.io;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

/**
* <p>Reads lines from a character-input file.</p>
* <p>This is the default implementation of IInputLine.</p>
* @see IInputLine
* @author Innovimax
* @version 1.0
*/
public class DefaultLineReader implements IInputLine {

	private final Path path;
	private final BufferedReader reader;

	/**
 	* Creates a line reader.
 	* @param input The input file to be read 	
 	* @throws IOException - If an I/O error occurs
 	*/
	public DefaultLineReader(File input) throws IOException {
		this.path = input.toPath();
		this.reader = Files.newBufferedReader(path, StandardCharsets.UTF_8);		
	}
	
	@Override
	public boolean hasLine() throws IOException {
		return this.reader.ready();
	}

	@Override
	public String nextLine() throws IOException {
		String line = null;
		if (hasLine()) {
			line = this.reader.readLine();
		}
		return line;
	}

	@Override
	public void close() throws IOException {
		this.reader.close();
	}

}

@@ -76,16 +76,78 @@
 o.File;%0A
+import java.io.InputStream;%0Aimport java.io.InputStreamReader;%0A
 import j
@@ -166,16 +166,16 @@
 eption;%0A
-
 import j
@@ -493,34 +493,8 @@
  %7B%0A%0A
-%09private final Path path;%0A
 %09pri
@@ -558,16 +558,28 @@
 e reader
+ from a file
 .%0A %09* @p
@@ -741,56 +741,336 @@
 his.
-path = input.toPath();%0A%09%09this.reader = Files.
+reader = Files.newBufferedReader(input.toPath(), StandardCharsets.UTF_8);%09%09%0A%09%7D%0A%09%0A%09/**%0A %09* Creates a line reader from an input stream.%0A %09* @param input The input stream to be read %09%0A %09* @throws IOException - If an I/O error occurs%0A %09*/%0A%09public DefaultLineReader(InputStream input) throws IOException %7B%0A%09        this.reader = 
 new
+ 
 Buff
@@ -1084,12 +1084,35 @@
 der(
-path
+new InputStreamReader(input
 , St
@@ -1128,27 +1128,26 @@
 rsets.UTF_8)
+)
 ;
-%09%09
 %0A%09%7D%0A%09%0A%09@Over

Update DefaultLineReader.java