Package javax.microedition.rms

Examples of javax.microedition.rms.RecordStore.closeRecordStore()


        menuScreen.probUpdateFromPDB();

        try {
            RecordStore rs = RecordStore.openRecordStore(rsStateName, false);
            byte[] data = rs.getRecord(1);
            rs.closeRecordStore();
            DataInputStream din = new DataInputStream(new ByteArrayInputStream(data));
            wc.setProgress(65);
            if (!din.readUTF().equals(version))
                throw new Exception("Version mismatch!");
            gobanCanvas.restore(din);
View Full Code Here


    public void open() {
        try {
            RecordStore rs = RecordStore.openRecordStore(rsName, false);
            byte[] data = rs.getRecord(1);
            rs.closeRecordStore();

            restore(new ByteArrayInputStream(data));
        } catch (RecordStoreNotFoundException e) {
            // DO NOTHING
        } catch (Exception e) {
View Full Code Here

            try {
                rs.setRecord(1, data, 0, data.length);
            } catch (InvalidRecordIDException e) {
                rs.addRecord(data, 0, data.length);
            }
            rs.closeRecordStore();
        } catch (Exception e) {
            //#ifdef debug
            e.printStackTrace();
            //#endif
        }
View Full Code Here

            DataInputStream din;

            try {
                RecordStore rs = RecordStore.openRecordStore(rsStateName, false);
                byte[] data = rs.getRecord(1);
                rs.closeRecordStore();
                din = new DataInputStream(new ByteArrayInputStream(data));
                if (!din.readUTF().equals(version)) {
                    din = null;
                    //#ifdef debug
                    System.out.println("Clean run: Version mismatch!");
View Full Code Here

            try {
                rs.setRecord(1, data, 0, data.length);
            } catch (InvalidRecordIDException e) {
                rs.addRecord(data, 0, data.length);
            }
            rs.closeRecordStore();
        } catch (Exception e) {
            //#if debug
            e.printStackTrace();
            //#endif
        }
View Full Code Here

    public void open(boolean clean) {
        if (!clean) {
            try {
                RecordStore rs = RecordStore.openRecordStore(rsName, false);
                byte[] data = rs.getRecord(1);
                rs.closeRecordStore();

                restore(new ByteArrayInputStream(data));
            } catch (RecordStoreNotFoundException e) {
                // DO NOTHING
            } catch (Exception e) {
View Full Code Here

            try {
                rs.setRecord(1, data, 0, data.length);
            } catch (InvalidRecordIDException e) {
                rs.addRecord(data, 0, data.length);
            }
            rs.closeRecordStore();
        } catch (Exception e) {
            //#ifdef debug
            e.printStackTrace();
            //#endif
        }
View Full Code Here

    if (customPort != null && !customPort.equals(""))
      port = Integer.parseInt(customPort);
   
  }
        try{
    rs.closeRecordStore();
  }catch (RecordStoreException exc1){
    System.out.println(exc1.getMessage());
  }

View Full Code Here

     
      noData = false; //data set
    }catch (RecordStoreException exc2){
      System.out.println(exc2.getMessage());
      try{
        rs.closeRecordStore();
      }catch (RecordStoreException exc1){
        System.out.println(exc1.getMessage());
        return false;
      }
      return false;
View Full Code Here

     
      noData = false; //data set
    }catch (RecordStoreException exc1){
      System.out.println(exc1.getMessage());
      try{
      rs.closeRecordStore();
      }catch (RecordStoreException exc2){
        System.out.println(exc2.getMessage());
        return false;
      }
      return false;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.