All pastes #138981 Raw Edit

Untitled

public text v1 · immutable
#138981 ·published 2006-08-19 16:05 UTC
rendered paste body
package RedeeJ2MELib;

import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordEnumeration;
import java.io.IOException;

public class Settings {
    /** Creates a new instance of Settings */
    RecordStore TheRecordStore;
    public Settings() {
	try {
	    TheRecordStore = RecordStore.openRecordStore( "blabla", true );
	}
	catch (RecordStoreException e) {
	}
    }
    static private Settings m_Singleton;
    static public Settings Singleton()
    {

	if( null == m_Singleton ) {
	    // if(savedsettings.exist()) load(); <-- implement
	    // else
	    m_Singleton = new Settings();
	}
	return m_Singleton;
    }
}