Reading a file in java through FileInputStream

package com.codefloor; import java.io.File; import java.io.FileInputStream; public class InputStreamExample { public static void main(String[] args) { File file = new File(“C:/samplefile.txt”); FileInputStream fis = null; try { fis = new FileInputStream(file); int data; System.out.print(“File Content is :”); while ((data = fis.read()) != -1) { System.out.print((char) data); } } catch (Exception e) { e.printStackTrace(); } finally…

Details

reading a file in VB6 using file system object

Dim myFSO As Scripting.FileSystemObject
Dim myTextStream As Scripting.TextStream
Dim myString As String

Set myFSO = New Scripting.FileSystemObject

If myFSO.FileExists("filepath.txt") Then
Set myTextStream = myFSO.OpenTextFile("filepath.txt", ForReading)
myString = myTextStream.ReadAll() ' file content will be available in myString
Call myTextStream.Close
End If

Set myTextStream = Nothing
Set myFSO = Nothing