lecture7

lecture7 - Web Technology for IE 8 October 2003

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Web Technology for IE 8 October 2003 http://www-classes.usc.edu/engr/ise/582 1 ISE 582: Information Technology for Industrial Engineering Instructor: Elaine Chew University of Southern California Department of Industrial and Systems Engineering Lecture 7 JAVA Cup Seven: Its All in the Packaging Winston & Narasimhan: Chapt 33-40 8 October 2003 Web Technology for IE 2 JAVA Cup 7 How to Read/Write Objects How to Modularize Programs Creating a Window Drawing Lines in Windows Writing Text in Windows Web Technology for IE 8 October 2003 http://www-classes.usc.edu/engr/ise/582 2 8 October 2003 Web Technology for IE 3 Review stream reader buffer stream writer stream reader tokens 8 October 2003 Web Technology for IE 4 Reading / Writing Objects Serialized input-output operations <obj.o/p.stream>.writeObject(<vector>) <obj.i/p.stream>.readObject() Indicate intentions to use operations by implements Serializable throws IOException , ClassNotFoundException Each instance must belong a class that implements the Serializable Interface Web Technology for IE 8 October 2003 http://www-classes.usc.edu/engr/ise/582 2 8 October 2003 Web Technology for IE 3 Review stream reader buffer stream writer stream reader tokens 8 October 2003 Web Technology for IE 4 Reading / Writing Objects Serialized input-output operations <obj.o/p.stream>.writeObject(<vector>) <obj.i/p.stream>.readObject() Indicate intentions to use operations by implements Serializable throws IOException , ClassNotFoundException Each instance must belong a class that implements the Serializable Interface Web Technology for IE 8 October 2003 http://www-classes.usc.edu/engr/ise/582 3 8 October 2003 Web Technology for IE 5 Reading Objects from File FileInputStream fileInputStream = new FileInputStream(in.data); ObjectInputStream objectInputStream = new ObjectInputStream( fileInputStream ); Vector <vector> = (Vector) objectInputStream .readObject(); 8 October 2003 Web Technology for IE 6 To Write Objects to File FileOutputStream fileOutputStream = new FileOutputStream(out.data); ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream); objectOutputStream.writeObject(<vector>); objectOutputStream.close(); Web Technology for IE 8 October 2003 http://www-classes.usc.edu/engr/ise/582 4 8 October 2003 Web Technology for IE 7 Modularing Your Program Compilation Units Packages Setting CLASSPATH Calling Methods from a Module Access to Var/Methods in Package 8 October 2003 Web Technology for IE 8 Compilation Units Define all classes in same file Only one class can be public Only one class is universally accessible Convention: each class has its own compilation unit Web Technology for IE 8 October 2003 http://www-classes.usc.edu/engr/ise/582 5 8 October 2003 Web Technology for IE 9 Packages Use single-class compilation units Indicate module using package statement at beginning of each c.ustatement at beginning of each c....
View Full Document

Page1 / 19

lecture7 - Web Technology for IE 8 October 2003

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online