Sie sind auf Seite 1von 2

GLS UNIVERSITY

BCA (SEM-V)
SUBJECT : Advance Java
ASSIGNMENT – I
Que 1. Do as directed:
1.available() method returns total number of remaining bytes that can be read
2.from this input stream without blocking.(True/False)
3.The classes used for Disk File handling are ____ and _____.
4.The I/O related classes are availabe in ______ package.
5.The InputStreamReader class converts _____ stream to _____stream.
6.The _____ class is used only to know the details about the file.
7.________ method returns -1 when end of file is encounterd.
8.7. Which method of RandomAccessFile will return the current location of the
file pointer?
9.Which method of RandomAccessFile class will move our pointer in file class.
10.Which method flushes the stream?
11.For the abstract classes, Object cannot be created but references of this type
can be declared.(True/False)
12.______ method sends any buffered byte to its destination.
13.The InputStreamReader class converts ____stream to ___________stream.
14.Java provides ____________package for reading and writing streams.
15.All the data in java is treated in _____ and ____ streams
16._____ method sends any buffered byte to its destination.
17._____ and _______class is used to read/write an object to/from file.
18.The InputStreamReader class converts _____ stream to _____ Stream.
19.Draw the hierarchy for InputStream Class
20.Draw the hierarchy for OutputStream Class
21.Draw the hierarchy for Reader Class
22.Draw the hierarchy for Writer Class
23.A stream can be defined as a sequence of data. (True / False)
24.File class can be used to read and write bytes into a file. (True / False)
25.In byte stream, data are accessed as a sequence of bytes. (True / False)
26.OutputStreamWriter converts byte stream to character stream. (True / False)

Q.2 Explain the following Methods with example.


1. mark()
2. close()
3. flush()
4. read()
5. skip(long b)
6. write(int)
7. markSupported()
8. void write(byte[] b, int off, int len)
9. Size()
10. seek(int len)
11. getFilePointer()
12. setLength(long newsize)
13. toCharArray()
14. toString()

Q.3 Attempt Following


1. Explain the streams in Java I/O.
2. Explain in detail: File class with its methods
3. Explain in detail: Byte Stream
4. Explain in detail: Disk File Handling
5. Explain in detail: Filterd Byte Stream
6. Explain in detail: SequenceInputStream
7. Explain in detail: ObjectOutputStream
8. Explain in detail: ObjectInputStream
9. Explain in detail: Random Access File
10. Explain in detail: Character Stream
11. Explain in detail: Reader class
12. Explain in detail: Writer class
13. Explain in detail: CharArrayReader class
14. Explain in detail: CharArrayWriter class
15. Explain in detail: ByteArrayInputStream class
16. Explain in detail: ByteArrayOutputStream class
17. Explain in detail : DataInputStream & DataOutputStream
18. Explain in detail: BufferedInputStream and BufferedOutputStream class.s

Note: All the students have to submiss questions in following sequence :

Roll. No. Question 1&2 Question 3


A001 to A015, B001 to B015, C001 to C015 All 1,7,13
A016 to A030, B016 to B030, C016 to C030 All 2,8,14
A031 to A045, B031 to B045, C031 to B045 All 3,9,15
A046 to A060, B046 to B060, C046 to C060 All 4,10,16
A061 to 0A75, B061 to B075, C061 to C075 All 5,11,17
A076 onwards, B076 onwards, C076 onwards All 6,12,18

Das könnte Ihnen auch gefallen