MIDP3.0

javax.microedition.rms
Class RecordStoreInfo

java.lang.Object
  extended by javax.microedition.rms.RecordStoreInfo

public final class RecordStoreInfo
extends java.lang.Object

A class representing information about a RecordStore, including authorization mode, encryption status, writeable status, and size information. The RecordStoreInfo information remains up to date for as long as the associated RecordStore remains open.

Since:
MIDP 3.0

Method Summary
 int getAuthMode()
          Reurn the authorization mode that was set when the RecordStore associated with this was created.
 long getSize()
          Returns the amount of space, in bytes, that the record store occupies.
 long getSizeAvailable()
          Returns the amount of additional room (in bytes) available for this record store to grow.
 boolean isEncrypted()
          Return a boolean indicating if the RecordStore associated with this RecordStoreInfo instance is encrypted.
 boolean isWriteable()
          Return the boolean writeable state for the RecordStore associated with this RecordStoreInfo instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAuthMode

public int getAuthMode()
                throws RecordStoreNotOpenException
Reurn the authorization mode that was set when the RecordStore associated with this was created.

Returns:
Throws:
RecordStoreNotOpenException - if the record store is not open

isWriteable

public boolean isWriteable()
                    throws RecordStoreNotOpenException
Return the boolean writeable state for the RecordStore associated with this RecordStoreInfo instance.

Returns:
true if the RecordStore is to be writable by other MIDlet suites that are granted access, false otherwise
Throws:
RecordStoreNotOpenException - if the record store is not open

isEncrypted

public boolean isEncrypted()
                    throws RecordStoreNotOpenException
Return a boolean indicating if the RecordStore associated with this RecordStoreInfo instance is encrypted.

Returns:
true if the RecordStore is encrypted, false otherwise
Throws:
RecordStoreNotOpenException - if the record store is not open

getSize

public long getSize()
             throws RecordStoreNotOpenException
Returns the amount of space, in bytes, that the record store occupies. The size returned includes any overhead associated with the implementation, such as the data structures used to hold the state of the record store, tags etc.

Returns:
the size of the record store in bytes. If the size of the record store exceeds java.lang.Long.MAX_VALUE, then java.lang.Long.MAX_VALUE MUST be returned.
Throws:
RecordStoreNotOpenException - if the record store is not open

getSizeAvailable

public long getSizeAvailable()
                      throws RecordStoreNotOpenException
Returns the amount of additional room (in bytes) available for this record store to grow. Note that this is not necessarily the amount of extra MIDlet-level data which can be stored, as implementations may store additional data structures with each record to support integration with native applications, synchronization, tag data etc.

Returns:
the amount of additional room (in bytes) available for this record store to grow. If the amount of additional room available for this record store to grow exceeds java.lang.Long.MAX_VALUE, then java.lang.Long.MAX_VALUE MUST be returned.
Throws:
RecordStoreNotOpenException - if the record store is not open

MIDP3.0

Send a comment or suggestionVersion 3.0 of Mobile Information Device Profile Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-2009 Motorola Inc. Portions copyright 1993-2002 Sun Microsystems, Inc. and Motorola, Inc. All Rights Reserved.