Hi there. 2
This is Diliman Hello and welcome back. 3
Let's look at I will which stands for input and output in any software. 4
It's very common to read data from some source and also to write some data up to some destination for 5
instance as this diagram shows is source or the destination can be a fine which can be on a local machine 6
or even on some remote the server. 7
In this case you can read something from a file or you can also write something into we are fine example 8
we'll be reading some data see us we find are generating a CSP file. 9
Which means that you're writing something in DC as we fight it on here to aioli or is simply a software 10
component that specializes in doing that reading and writing. 11
Similarly when you're interacting with a web service like send rest API you would request some data 12
on process response and when requesting data you mean sometimes how to send some data with the API that 13
is your right data onto the network which will be passed on to the API server. 14
And this gives the rest server who would act as a destination understrapper your server would then send 15
some response back in which gives the rest of us or were would also act as its source. 16
So the rest of us are is acting as both source and destination. 17
And sometimes we have to download webpages for example in our application may want to download all the 18
web links in the system so that users can search the contents of those babblings in disguise. 19
The remote web server acts as a source. 20
In fact run off or project extensions and this chapter is about downloading ramblings. 21
So these are some common activities and many times they can be very critical from a business standpoint 22
and this chapter is all about how we can read data from such different sources and also how we can write 23
data to different destinations. 24
Just know that our destination is also referred to as us. 25
But as a language we are creating a good I will frame work is very challenging and one reason is due 26
to the different types of sources and sinks in one like file network console and so on. 27
And second is due to the number of different areas in which we can communicate with these different 28
social son. 29
For example sometimes you may want to read the dot sequence Cheney and sometimes you may want to read 30
that a dot randomly and in some cases you may want to read the data as individual bytes. 31
And in some other cases you may want to read them as a group halfbacks Also the data format can be different 32
too. 33
That is data that can be in binary or in character format. 34
I guess this job is a nurse created lots and lots of specialized classes and these specialized classes 35
can be combined or changed in different ways. 36
And one most common benefit of such a training is to improve the speed in performing input and output 37
. 38
So there are process which will specifically help in improving speed and you will see how we can use 39
them. 40
No Djala comes with two sets of packages. 41
One is java.io God I will. 42
It is referred to as my will and second is gelada. 43
And I will which is referred to as new I will doctor I will. 44
Was there from the beginning. 45
Well and I was introduced in July 4 and in this chapter we will focus only on stream my will as it is 46
most commonly used in the future I'm most likely Aard one or two lessons on Jemadar and I will. 47
And here are the things we will see in this chapter which fall under stream I will Lytton's my well 48
. 49
There are two sets of packages. 50
The first set of packages is classified as byte strings under use for handling binary data such as images 51
. 52
And the second set of packages is classified as character streams under use for handling characters 53
like Ex-Files under that exploit. 54
Each of them separately not within byte streams we will see how we can read and write binary data such 55
as images in an efficient way. 56
And in the process we will also look at a design pattern called decorator pattern. 57
We will also see how we can see you everyday Guler Java objects to disk and how we can read them back 58
from the disk and get them to cross streams Vivan see how we can read and write text content in an efficient 59
way. 60
We will also see how we can collect input from the user through the console. 61
That is a command prompt. 62
So we will see how we can make our program interact with the user. 63
And lots of several demos. 64
And most importantly we'll be making few important extensions to our project. 65
Now in the current portion of the project most of the data such as user and Marber how been hardcoded 66
in jar files but with the new extension liberalitie the same data from text files and other extension 67
would be to download ramblings that is good. 68
Note that actually the page content of those who blinks and then write them to their desk. 69
That way we will see how we can go right back to their desk. 70
But before we do any of this we also have a prerequisite Allison caracter in coding and it is the first 71
lesson of the chapter understanding Conacher and coding is very important if we want to write programs 72
that read and write text. 73
So it is a fundamental lesson and if youre not of enough character encoding then you definitely should 74
not give this lesson and thats about it. 75
So lets go ahead and learn all about performing and put on outworker