Java IDL is similar to RMI (Remote Method Invocation), which supports distributedobjects written entirely in the Java programming language. However. Java IDL enablesobjects to interact regardless of whether they’re written in the Java programminglanguage or another language such as C, C++, COBOL, or others.Java IDL is based on the Common Object Request Brokerage Architecture (CORBA), anindustry-standard distributed object model.A key feature of CORBA is IDL, a language-neutral Interface Definition Language.Each language that supports CORBA has its own IDL mapping and as its name implies,Java IDL supports the mapping for Java. CORBA and the IDL mappings are the work of an industry consortium known as the OMG, or Object Management Group.To support interaction between objects in separate programs, Java IDL provides anObject Request Broker, or ORB. The ORB is a class library that enables low-levelcommunication between Java IDL applications and other CORBA-compliantapplications
Ques3 Explain the different methods used in Input Stream class andOutput Stream class?Ans3
ClassesThe FileInputStream and FileOutputStream ClassesThese streams are classified as mode streams as they read and write data from disk files.The classes associated with these streams have constructors that allows you to specifythe path of the file to which they are connected.The FileInputStream class allows you toread input from a file in the form of a stream.The FileOutputStream class allows you towrite output to a file stream.ExampleFileInputStream inputfile = new FileInputStream (“Employee.dat”);FileOutputStream outputfile = new FileOutputStream (“binus.dat”);The BufferedInputStream and BufferedOutputStream ClassesThe BufferedInputStream class creates and maintains a buffer for an input stream. Thisclass is used to increase the efficiency of input operations. This is done by reading datafrom the stream one byte at a time. The BufferedOutputStream class creates andmaintains a buffer for the output stream. Both the classes represents filter streams.The DataInputStream and DataOutputStream ClassesThe DataInputStream and DataOutputStream classes are filter streams that allow thereading and writing of Java primitive data types. The DataInputStream class provides thecapability to read primitive data types from an input stream. It implements the methods presents in the Data Input interface.Methods of the DataInputStream class
Method Explanation boolean readBoolean()Reads one byte and returns true if that byte is nonzero, false if it iszero. byte readByte ()Reads a byte as an 8-bit signed value.char readChar ()Reads a Unicode character.int readInt ()Reads an integer value.