Package de.esoco.j2me.util

Examples of de.esoco.j2me.util.IntArray


      nStorageHandle = rStorage.getCurrentNode();
    }

    int nPreviousNodeStorageHandle = readFields(rStorage);

    IntArray aPrevNodeHandles = new IntArray();

    while (rStorage.nextNode())
    {
      BasicHierarchyNode rNode = newChildNode(null);

      rNode.rParent = this;
      aPrevNodeHandles.add(rNode.readFrom(rStorage));
      rStorage.closeNode();
      aChildren.addElement(rNode);
    }

    rebuildChildOrder(aPrevNodeHandles);
View Full Code Here


    {
      // size = number of records + 1 for additional root element
      int          nRecords = rRecordStore.getNumRecords() + 1;
      byte[]        aBuf     = null;
      DataInputStream   aIn     = null;
      IntArray      aIDs     = new IntArray(nRecords);
      RecordEnumeration aRecords;

      aRecords   = rRecordStore.enumerateRecords(null, null, false);
      aRecordIDs = new Vector(nRecords);

      // insert first element as a root that is not part of the RecordStore
      aIDs.push(-1);
      aRecordIDs.insertElementAt(new NodeRecordIDs(-1, -1), 0);

      while (aRecords.hasNextElement())
      {
        // read all record IDs and store them in ascending order;
        // this makes sure that children are always behind their parent
        int nID   = aRecords.nextRecordId();
        int nPos  = aIDs.insertAscending(nID, 1);
        int nSize = rRecordStore.getRecordSize(nID);

        if ((aBuf == null) || (aBuf.length < nSize))
        {
          // increase buffer size and (re-)initialize the input stream
View Full Code Here

TOP

Related Classes of de.esoco.j2me.util.IntArray

Copyright © 2018 www.massapicom. 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.