O'Reilly logo

Flex 4 Cookbook by Garth Braithwaite, Joshua Noble, Todd Anderson, Marco Casario, Rich Tretola

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Working with Data in AIR

To many Flex developers who are new to AIR, some of its functionality may appear foreign. Because of this, developers will sometimes create applications that don’t take full advantage of the powerful capabilities AIR provides. Prime examples are AIR’s capabilities for storing and working with local data.

The first area of functionality that deals with storing and working with local data is the Encrypted Local Store. This provides secure key/value local storage of binary data. The data can only be accessed by your AIR application.

The second area is the embedded data support with SQLite in AIR. This provides full relational database support directly on the user’s computer. This allows the developer to store and retrieve almost any type of data using SQL queries.

The final area is the local filesystem support. AIR gives you full access to the local filesystem, including the ability to create, delete, copy, and edit files and folders on the user’s computer.

By learning to work with these three key features of the AIR API, you can take full advantage of the power AIR provides.

19.1. Safeguard Files with the Encrypted Local Store

Contributed by Ryan Stewart

Problem

You need to protect entire files inside an AIR application.

Solution

Use the Encrypted Local Store and the file APIs to put a file in a safe and secure location.

Discussion

Most people associate the Encrypted Local Store with storing usernames and passwords or other bits of text. In reality, the Encrypted ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required