OKI Common Services Byte Storing and Filing API.

The 'filing' api (renamed from 'file'), provides a way of storing and retrieving static content. It provides an abstraction layer between the file system and the OKI application.

For example, some implementations may allow the OKI application to use this API to access files stored on other computer systems. The implementation of the API may provide features not available in any native file system.

There are analogies between elements the API and Unix filesystems, but these should be viewed as convergent evolution, rather than as a direct relationship.

It follows when appropriate the java.io.File class. However, in this API the concepts of 'file' and 'directory' are kept separate, since a 'directory' need not be implemented as a special case of 'file' as it is in Unix file systems. Further, the notion of a "path" is not so ingrained in this API.

It is not bound to Java, and should be usable from other languages. For compatiblity with existing Java or .NET IO libraries, methods are provided to return platform-dependant objects, three methods are provided which return platform-native IO objects. However, these should be avoided as much as practical.

In this API are:

  1. Factory, which allows an implementation to be chosen. Each implementation is analogous to a file system type.
  2. Cabinet, which is an interface to objects analogous to directories. A special Cabinet is the root cabinet, which has no parent cabinet, corresponding to the root of a filesystem. Cabinets and root cabinets are obtained from the Factory implementation. Cabinets provide organizational grouping for ByteStores.
  3. ByteStore, which is an interface to objects analogous to files. ByteStores are obtained from a Cabinet. A ByteStore is identified by its locally unique identifier, and in all implementations may be moved from one cabinet to another if the two cabinets have the same root cabinet. The ByteStore has content, as an array of bytes, and physical metadata about itself, including a name, mime-type, and owner.
  4. CabinetEntry, which may be a ByteStore or a Cabinet.
  5. ByteStoreIO, which is an interface providing input/output methods to access the data in the ByteStore. Methods are provided for reading, writing, and seeking within the ByteStore.