I am doing a project in which there are so many files I have to handle. Problem came when I have to provide file in different manner like:
- File will contain one string in each line
numbers of char in each line e.g. :
1st line : A B 4 2nd line : 6 C A 6 & U # etc.
File will contain no. of Strings e.g.
1st line : Lion Panther jaguar etc.
I have read how to efficiently handle file but I am so confused when to use Buffered Streams and when Unbuffered. If I am using BufferedStream then BufferInputStream
and BufferReader
/ BufferWriter
which should be used.
Similarly I am confuse with I/O Stream, File I/O Stream, ByteArray I/O Stream. There are so many things. Can any one suggest me when to use which one and why? What could be efficient handling according to the different scenarios?