Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

13. Enhanced Slideshow App > 13.3. Technologies Overview

13.3. Technologies Overview

This section presents the new technologies that we use in the Enhanced Slideshow app.

File Processing and Object Serialization

The app stores slideshows on the device for viewing later. Earlier apps showed techniques for saving text data in key–value pairs. This app stores entire SlideshowInfo objects using object serialization (Section 13.5.3). A serialized object is represented as a sequence of bytes that includes the object’s data and information about the object’s type.

The serialization capabilities are located in package java.io. To use an object with the serialization mechanism, the object’s class must implement the Serializable interface, which is a tagging interface. Such an interface does not contain methods. Objects of a class that implements Serializable are tagged as being Serializable objects—that is, any object of a class that implements Serializable is a Serializable object. An ObjectOutputStream serializes Serializable objects to a specified OutputSteam—in this app, a FileOutputStream. Tagging objects as Serializable is important, because an ObjectOutputStream output only Serializable objects.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint