Hello Deole, Pushkar (Pushkar), I am not an expert on the Java SDK, but after further research, I found the below Microsoft document for your requirement. https://learn.microsoft.com/en-us/azure/data-lake-store/data-lake-store-get-started-java-sdk#read-a-file
// Read File
InputStream in = client.getReadStream(filename);
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String line;
while ( (line = reader.readLine()) != null) {
System.out.println(line);
}
reader.close();
System.out.println();
System.out.println("File contents read.");
The above code reads data from a single blob file line by line without loading the entire blob into memory. The getReadStream
method returns an InputStream
for the blob, and the BufferedReader
reads the blob line by line.
I hope this helps.