Blog Archives
Page 1 of 2
1 2

06: Java 8 way of File reading and functionally processing the data

Output:

#1 double colon notation ::

The new double colon (::) operator that Java 8 has to convert a normal method into lambda expression. So,

Instead of:

You can do:

#2 Why is stream::iterator used?

Read more ›



15 Java old I/O and NIO (i.e. New I/O) interview Q&As

Q1. What is the purpose of Java I/O System? A1. The purpose is to provide an abstraction for all types of I/O like memory, file, directory, network, and pipe. Pipes in Java IO provides the ability for two threads running in the same JVM to communicate with each other. …...

Members Only Content
Log In Register Home


6 Key considerations in processing large files in Java

Q1. What are the key considerations in processing large files?
A1. Before jumping into coding, get the requirements.

#1 Trade-offs among CPU, Memory Usage & Disk I/O

Processing a file involves reading from the disk, processing (e.g. parsing an XML and transforming), and writing back to the disk.

Read more ›



Processing large files efficiently – BigData & Hadoop – part 3

Q1. What are the different data sizes, and what technologies can be used to process them? A1. In general, data sizes can be classified as shown below. 1) Small size data is < 10 GB in multiple files. … Read more ›...

Members Only Content
Log In Register Home


Processing large files efficiently in Java – multi-threaded code – part 2

If you want to process medium sized data (e.g. 2 GB to 100 GB in multiple files) in Java, consider writing a batch job with Spring batch or Java EE 7.0 batch processing. If processing requires access to other systems, use “spring integration” … Read more ›...

Members Only Content
Log In Register Home


Read a text file from Java classpath

File to read: src/main/resources/examples/request.xml

read-file-from-classpath

1. Using Java API without any libraries

You can also use the “ClassLoader”

2. Using Java 7 NIO

3. Using Apache commons-io library

4.

Read more ›



Page 1 of 2
1 2

800+ Java Interview Q&As

Prepare to fast-track & go places
with multi-offers to choose from & increased earning potential. Expand your horizons along the way by taking the road less travelled.
Learn by categories on the go...
Learn by categories such as FAQs – Core Java, Key Area – Low Latency, Core Java – Java 8, JEE – Microservices, Big Data – NoSQL, etc. Some posts belong to multiple categories.
Top