Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.flash
Class NorFlashMemoryHeap

    java.lang.Object
      com.sun.squawk.flash.NorFlashMemoryHeap

All Implemented Interfaces:
  INorFlashMemoryHeap

    public class NorFlashMemoryHeap

extends Object
implements INorFlashMemoryHeap

Field Summary
`static byte[]` | `BLOCK_FOOTER`
`static int` | `BLOCK_HEADER_SIZE`
`protected INorFlashSectorState` | `currentSectorState`
`static byte` | `ERASED_VALUE`
`static byte` | `ERASED_VALUE_XOR`
`protected int` | `erasedSequenceCurrentValue`
`protected boolean` | `hasScannedBlocks`
`protected INorFlashSectorStateList` | `inUseSectorStateList`
`protected INorFlashSectorState[]` | `sectorStates`
`protected INorFlashSectorStateList` | `toBeErasedSectorStateList`

Constructor Summary
`protected` | `NorFlashMemoryHeap()`
`` | `NorFlashMemoryHeap(INorFlashSectorState[] sectorStates)`
`` | `NorFlashMemoryHeap(int purpose)`

Method Summary
`Address` | `allocateAndWriteBlock(byte[] bytes, int offset, int length, INorFlashMemoryHeapScanner scanner)`
`void` | `forceEraseAll()`
`void` | `freeBlockAt(Address address)`
`IMemoryHeapBlock` | `getBlockAt(Address address)`
`protected boolean` | `getBlockAt(IMemoryHeapBlock block, INorFlashSectorState sectorState, int offset)`
`long` | `getErasedSequenceCurrentValue()`
`static Vector` | `getNorFlashSectors(int purpose)`
`INorFlashSectorState` | `getSectorContaining(Address address)`
`int` | `getSizeAvailable()`
`int` | `incrementErasedSequence()`
`protected void` | `init(INorFlashSectorState[] sectorStates)`
`protected void` | `makeRoomToWrite(int entrySize, INorFlashMemoryHeapScanner scanner)`
`void` | `scanBlocks(INorFlashMemoryHeapScanner scanner)` It is guaranteed that the order that blocks were allocated in, is the order in which they will be iterated.
`protected Address` | `writeBlock(IMemoryHeapBlock block, INorFlashMemoryHeapScanner scanner, Address oldAddress)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ERASED_VALUE

    public static final byte ERASED_VALUE

See Also:
  Constant Field Values

### ERASED_VALUE_XOR

    public static final byte ERASED_VALUE_XOR

See Also:
  Constant Field Values

### BLOCK_HEADER_SIZE

    public static final int BLOCK_HEADER_SIZE

See Also:
  Constant Field Values

### BLOCK_FOOTER

    public static final byte[] BLOCK_FOOTER

### sectorStates

    protected INorFlashSectorState[] sectorStates

### currentSectorState

    protected INorFlashSectorState currentSectorState

### erasedSequenceCurrentValue

    protected int erasedSequenceCurrentValue

### inUseSectorStateList

    protected INorFlashSectorStateList inUseSectorStateList

### toBeErasedSectorStateList

    protected INorFlashSectorStateList toBeErasedSectorStateList

### hasScannedBlocks

    protected boolean hasScannedBlocks

Constructor Detail

### NorFlashMemoryHeap

    protected NorFlashMemoryHeap()

### NorFlashMemoryHeap

    public NorFlashMemoryHeap(INorFlashSectorState[] sectorStates)

### NorFlashMemoryHeap

    public NorFlashMemoryHeap(int purpose)

Parameters:
  `purpose` - One of INorFlashMemorySector.USER_PURPOSED
Throws:
  `IOException`

Method Detail

### getNorFlashSectors

    public static Vector getNorFlashSectors(int purpose)

  Returns:
    SquawkVector

### forceEraseAll

    public void forceEraseAll()

  Specified by:
    `forceEraseAll` in interface `INorFlashMemoryHeap`

### freeBlockAt

    public void freeBlockAt(Address address)
                     throws RecordStoreException

  Specified by:
    `freeBlockAt` in interface `INorFlashMemoryHeap`
  Throws:
    `RecordStoreException`

### getBlockAt

    public IMemoryHeapBlock getBlockAt(Address address)
                                throws RecordStoreException

  Specified by:
    `getBlockAt` in interface `INorFlashMemoryHeap`
  Throws:
    `RecordStoreException`

### getBlockAt

    protected boolean getBlockAt(IMemoryHeapBlock block,
                                 INorFlashSectorState sectorState,
                                 int offset)
                          throws RecordStoreException

  Parameters:
    `block` -
    `sectorState` -
    `offset` -
  Returns:
    boolean true if there was a block at that address, false if not
  Throws:
    `RecordStoreException`

### getErasedSequenceCurrentValue

    public long getErasedSequenceCurrentValue()

  Specified by:
    `getErasedSequenceCurrentValue` in interface `INorFlashMemoryHeap`

### getSectorContaining

    public INorFlashSectorState getSectorContaining(Address address)

### getSizeAvailable

    public int getSizeAvailable()
                         throws RecordStoreException

  Specified by:
    `getSizeAvailable` in interface `INorFlashMemoryHeap`
  Throws:
    `RecordStoreException`

### incrementErasedSequence

    public int incrementErasedSequence()

### init

    protected void init(INorFlashSectorState[] sectorStates)

### makeRoomToWrite

    protected void makeRoomToWrite(int entrySize,
                                   INorFlashMemoryHeapScanner scanner)
                            throws RecordStoreException

  Throws:
    `RecordStoreException`

### allocateAndWriteBlock

    public Address allocateAndWriteBlock(byte[] bytes,
                                         int offset,
                                         int length,
                                         INorFlashMemoryHeapScanner scanner)
                                  throws RecordStoreException

  Specified by:
    `allocateAndWriteBlock` in interface `INorFlashMemoryHeap`
  Throws:
    `RecordStoreException`

### scanBlocks

    public void scanBlocks(INorFlashMemoryHeapScanner scanner)
                    throws RecordStoreException

  It is guaranteed that the order that blocks were allocated in, is the order in which they will be iterated.

  Specified by:
    `scanBlocks` in interface `INorFlashMemoryHeap`
  Parameters:
    `scanner` -
  Throws:
    `RecordStoreException`

### writeBlock

    protected Address writeBlock(IMemoryHeapBlock block,
                                 INorFlashMemoryHeapScanner scanner,
                                 Address oldAddress)
                          throws RecordStoreException

  Throws:
    `RecordStoreException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"