Sub ReadFileEncoded(FileName As String,Encoding As String) As List
Dim JO As JavaObject
Dim FileLine As String
Dim RowList As List
RowList.Initialize()
JO.InitializeNewInstance("java.io.BufferedReader",Array As Object(JO.InitializeNewInstance("java.io.InputStreamReader",Array As Object(JO.InitializeNewInstance("java.io.FileInputStream",Array As Object(FileName)),Encoding ))))
FileLine = ""
Dim ReadingFile As Boolean = True
Do While ReadingFile = True
FileLine = JO.RunMethod("readLine",Null)
If FileLine.Length > 0 Then
RowList.Add(FileLine)
Else
ReadingFile = False
End If
Loop
Return RowList
End Sub