1

00:00:00,930  -->  00:00:06,780
So be looked at byte streams knowledge let's look at the second degree or stream my characters dreams

2

00:00:08,360  -->  00:00:14,640
and characters streams are used to read or write characters that are like text files but that will go

3

00:00:14,700  -->  00:00:21,510
on top of byte streams as essentially everything is binary that is even text files are also binary files

4

00:00:21,510  -->  00:00:22,860
.

5

00:00:23,070  -->  00:00:29,460
No recall that just like the way input stream an output stream crosses some of the base classes for

6

00:00:29,460  -->  00:00:35,280
all byte oriented streams read it and write up classes service based classes for a quarterly InterSystems

7

00:00:35,280  -->  00:00:35,940
.

8

00:00:36,240  -->  00:00:40,300
And in this lesson we will focus only on reader and writer process.

9

00:00:40,470  -->  00:00:43,920
And let's just look at the reader class.

10

00:00:44,010  -->  00:00:45,400
It is a bit abstract class.

11

00:00:45,540  -->  00:00:53,370
For art Carco Ruby entered input streams and it is used to read 16 bit character data and you give 16

12

00:00:53,370  -->  00:00:59,440
format as we know that July is based on you be of 16 encoding scheme.

13

00:01:00,180  -->  00:01:01,350
And here is one right there.

14

00:01:01,560  -->  00:01:08,280
And it is used to read that single character and get into the corresponding engrain you get for being

15

00:01:08,280  -->  00:01:12,580
between zero and two to the power of 16 minus one.

16

00:01:12,600  -->  00:01:19,690
That could be 65000 5:35 as you can see it is quite similar to the read method in the input stream class

17

00:01:19,720  -->  00:01:20,190
.

18

00:01:20,670  -->  00:01:26,700
There are only a single byte was being written on so the range was zero due to to the part of 8 minus

19

00:01:26,700  -->  00:01:29,960
one that is 0 to 255.

20

00:01:30,990  -->  00:01:37,230
And the method would read and minus one of the and nostri Mr. Director and here is the completion of

21

00:01:37,230  -->  00:01:43,160
the read method which is used to re group of characters who have the input arrays a caterpillar.

22

00:01:43,620  -->  00:01:49,060
Recall that in the read method in the input stream class it was a binary.

23

00:01:49,350  -->  00:01:55,680
This mother would read up to the number of characters from the input stream into the input character

24

00:01:55,680  -->  00:02:04,040
of the starting and index position offset under-treated set of characters entered or minus one.

25

00:02:04,050  -->  00:02:12,510
If I nostri Mr. Dictator just that all the recalls would block that is that would block and then some

26

00:02:12,600  -->  00:02:20,820
input data is available or some Iowa exception is generated or no stream is reached.

27

00:02:21,020  -->  00:02:22,870
Now let's look at the right across.

28

00:02:23,010  -->  00:02:30,990
It is a base abstract class for all character oriented output streams and it is used to write 16 bit

29

00:02:30,990  -->  00:02:36,970
characters that aren't to our destination and the destination may use a different character format.

30

00:02:37,380  -->  00:02:41,830
That is it could be something different from UTF 16.

31

00:02:42,000  -->  00:02:48,030
And here is a method for writing one character to the output string here the input parameter is an int

32

00:02:48,150  -->  00:02:49,800
which has 32 bits.

33

00:02:49,800  -->  00:02:52,740
So the method writes The were two bytes.

34

00:02:52,740  -->  00:02:59,000
That is the 16 bits that appear on the rightmost and unrest of the bits are discarded.

35

00:02:59,450  -->  00:03:02,760
Recall that in case of output string class it was 8.

36

00:03:02,770  -->  00:03:07,440
LU What are the words that were returned to the output stream.

37

00:03:07,590  -->  00:03:09,600
And here is the second version of the right method.

38

00:03:09,720  -->  00:03:12,380
And it is used to write group of characters.

39

00:03:12,870  -->  00:03:18,900
So the method will write length number of characters from the input characters starting at the end exposition

40

00:03:18,930  -->  00:03:21,230
offset.

41

00:03:21,510  -->  00:03:24,780
And here is the inheritance tree for reading characters.

42

00:03:25,000  -->  00:03:30,150
It trust most of the reader base classes and we will explore some of these classes.

43

00:03:30,390  -->  00:03:35,700
The first ones we will look at will be buffered reader an input stream reader and as you may have guessed

44

00:03:36,210  -->  00:03:42,600
Bufford reader will help us with buffering not to compare this with input stream based inheritance tree

45

00:03:42,610  -->  00:03:42,670
.

46

00:03:42,720  -->  00:03:46,420
You will also notice quite a bit of similarities.

47

00:03:47,120  -->  00:03:52,620
And here is the inheritance tree for writing characters and it is very similar to the reader history

48

00:03:53,420  -->  00:03:56,810
clearly shown here is the print writer class.

49

00:03:56,850  -->  00:03:58,020
So that's about it.

50

00:03:58,020  -->  00:04:04,200
And we mainly look at the reader and writer process which are the two best abstract classes for reading

51

00:04:04,200  -->  00:04:05,750
and writing characters.

52

00:04:05,790  -->  00:04:06,210
Thank you
