Java Programs IO STREAMS
#1

Java Programs IO STREAMS


.doc   IO STREAMS.doc (Size: 264.5 KB / Downloads: 0)

Java programs perform I/O through streams. A stream is an abstraction that either produces or consumes information. A stream is linked to a physical device by the java I/O system. Stream is a pipe used to transfer the data from input unit to memory, memory to output unit. A stream is an object through which the data flows from source to the destination. To bring in information, a program opens a stream on an information source and reads the information sequentially.

Character Streams:

Character streams are defined by using two class hierarchies. At the top are two abstract classes, reader & writer. These abstract classes handle Unicode character streams in java.io.
Reader provides the API & partial implementation for reader –streams that read 16bit characters and writer providers API and partial implementation writer-streams that writes 16 bit characters. Subclasses of reader & writer implements specialized streams and are divided into two types:
Two of the most important methods are read( ) and write( ), which read and write characters of data, respectively. These methods are overriden by derived stream classes.

Input stream & output stream.

To read & write 8 bit byte, programs should use the byte streams. Descendants of input stream & output stream. These streams are typically used to read & write binary data such as images and sounds to of the byte streams classes, object input stream & object output stream. Are used for object serialization. Two of the most important are read( ) & write( ), which respectively , read & write bytes of the data. Both methods are declared as a abstract inside input stream & output stream. They are overridden by derived stream classes.

EXCEPTION HANDLING:

A java exception is an object that describes an exceptional condition that has occurred in a piece of code. When an exceptional condition arises, an object representing that exception is created & thrown in the method that caused the error. That method may choose to handle the exception itself or pass it on. At same point, the exception is caught & processed. Exceptions can be generated by the java run time system, or they can be manually generated by your code.
Java exceptions handling is managed via five keywords:Try, catch, throw, throws, and finally. Here is how they work program statements that you want to monitor for exceptions are contained with in a try block. If an exception occurs with in the try block, it is thrown. Your code can catch this exception & handle it in same rational manner. System generated exceptions are automatically thrown by the java run time system. To manually throw an exception use the keyword throws. Any exception that is thrown out of a method must be specified as such by a throws clause. Any code that absolutely must be executed before a method returns is put in a finally block.





Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: educational television programs, top hacking programs, dhs training programs, basketball training programs, educational programs in new, powered by vbulletin free computer security programs, telecom communication systems java programs,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  E-COMPILER FOR JAVA WITH SECURITY EDITOR smart paper boy 7 11,746 27-07-2013, 01:06 PM
Last Post: computer topic
  E-COMPILER FOR JAVA WITH SECURITY EDITOR seminar class 9 13,518 24-06-2013, 11:44 AM
Last Post: Guest
  Java Cryptography Architecture (JCA) seminar projects crazy 1 2,562 17-12-2012, 01:51 PM
Last Post: seminar details
Lightbulb Java Cryptography Architecture (JCA) computer science crazy 1 2,611 17-12-2012, 01:51 PM
Last Post: seminar details
  if u can help me in java RMI ahmed abed 2 1,748 04-02-2012, 11:37 AM
Last Post: seminar addict
  JAVA RMI Technology seminar surveyer 3 3,187 26-01-2012, 10:31 AM
Last Post: seminar addict
  JAVA RING A SEMINAR REPORT Computer Science Clay 6 6,620 07-01-2012, 12:19 PM
Last Post: project uploader
  Bluetooth & Java smart paper boy 2 1,517 24-08-2011, 09:33 AM
Last Post: seminar addict
  Java Debug Hardware Modules Using JBits smart paper boy 0 1,015 18-08-2011, 02:00 PM
Last Post: smart paper boy
  SOCKET PROGRAMMING IN JAVA full report smart paper boy 0 1,817 21-06-2011, 12:44 PM
Last Post: smart paper boy

Forum Jump: