com.sun.squawk.flash
Class NorFlashSectorState
java.lang.Object
   com.sun.squawk.flash.NorFlashSectorState
com.sun.squawk.flash.NorFlashSectorState
- All Implemented Interfaces: 
- INorFlashSectorState
- public class NorFlashSectorState 
- extends Object- implements INorFlashSectorState
 
 
| Method Summary | 
| protected  void | checkReadWriteParameters(int offset,
                         byte[] buffer,
                         int bufferStart,
                         int bufferLength)
 | 
|  void | decrementMallocedCount()
 | 
|  void | erase(long sequence)
 | 
|  void | forceErase()
 | 
|  int | getAllocatedBlockCount()
 | 
|  Address | getEndAddress()
 | 
|  int | getFreedBlockCount()
 | 
|  INorFlashSectorState | getNextSector()
 | 
|  INorFlashSectorStateList | getOwningList()
 | 
|  long | getSequence()
 | 
|  int | getSize()
 | 
|  Address | getStartAddress()
 | 
|  Address | getWriteHeadAddress()
 | 
|  int | getWriteHeadPosition()
 | 
|  boolean | hasAvailable(int length)
 | 
|  boolean | hasErasedHeader()
 | 
|  void | incrementAllocatedBlockCount()
 | 
|  void | incrementFreedBlockCount()
 | 
|  void | init(Address startAddress,
     int size)
 | 
| protected  void | initState()
 | 
|  void | readBytes(int offset,
          byte[] buffer,
          int bufferStart,
          int bufferLength)
 | 
|  void | removeErasedHeader()
 | 
|  void | resetHead()
 | 
|  void | setNextSector(INorFlashSectorState next)
 | 
|  void | setOwningList(INorFlashSectorStateList list)
 | 
|  void | setWriteHeadPosition(int position)
 | 
|  void | writeBytes(byte[] buffer,
           int bufferStart,
           int bufferLength)
 | 
|  void | writeBytes(int offset,
           byte[] buffer,
           int bufferStart,
           int bufferLength)
 | 
 
 
ERASED_HEADER
public static final byte[] ERASED_HEADER
ERASED_HEADER_SIZE
public static final int ERASED_HEADER_SIZE
BUFFER
public static final byte[] BUFFER
startAddress
protected Address startAddress
endAddress
protected Address endAddress
writeHead
protected int writeHead
flashSector
protected INorFlashSector flashSector
sequence
protected long sequence
nextSector
protected INorFlashSectorState nextSector
owningList
protected INorFlashSectorStateList owningList
mallocedBlockCount
protected int mallocedBlockCount
freedBlockCount
protected int freedBlockCount
hasErasedHeader
protected boolean hasErasedHeader
NorFlashSectorState
protected NorFlashSectorState()
NorFlashSectorState
public NorFlashSectorState(INorFlashSector flashSector)
checkReadWriteParameters
protected void checkReadWriteParameters(int offset,
                                        byte[] buffer,
                                        int bufferStart,
                                        int bufferLength)
- 
 
- 
 
decrementMallocedCount
public void decrementMallocedCount()
- 
- Specified by:
- decrementMallocedCountin interface- INorFlashSectorState
 
- 
 
erase
public void erase(long sequence)
           throws RecordStoreException
- 
- Specified by:
- erasein interface- INorFlashSectorState
 
- 
- Throws:
- RecordStoreException
 
forceErase
public void forceErase()
                throws RecordStoreException
- 
- Specified by:
- forceErasein interface- INorFlashSectorState
 
- 
- Throws:
- RecordStoreException
 
getNextSector
public INorFlashSectorState getNextSector()
- 
- Specified by:
- getNextSectorin interface- INorFlashSectorState
 
- 
 
getOwningList
public INorFlashSectorStateList getOwningList()
- 
- Specified by:
- getOwningListin interface- INorFlashSectorState
 
- 
 
getEndAddress
public Address getEndAddress()
- 
- Specified by:
- getEndAddressin interface- INorFlashSectorState
 
- 
 
getFreedBlockCount
public int getFreedBlockCount()
- 
- Specified by:
- getFreedBlockCountin interface- INorFlashSectorState
 
- 
 
getSequence
public long getSequence()
- 
- Specified by:
- getSequencein interface- INorFlashSectorState
 
- 
 
getSize
public int getSize()
- 
- Specified by:
- getSizein interface- INorFlashSectorState
 
- 
 
getStartAddress
public Address getStartAddress()
- 
- Specified by:
- getStartAddressin interface- INorFlashSectorState
 
- 
 
getAllocatedBlockCount
public int getAllocatedBlockCount()
- 
- Specified by:
- getAllocatedBlockCountin interface- INorFlashSectorState
 
- 
 
getWriteHeadAddress
public Address getWriteHeadAddress()
- 
- Specified by:
- getWriteHeadAddressin interface- INorFlashSectorState
 
- 
 
getWriteHeadPosition
public int getWriteHeadPosition()
- 
- Specified by:
- getWriteHeadPositionin interface- INorFlashSectorState
 
- 
 
hasAvailable
public boolean hasAvailable(int length)
- 
- Specified by:
- hasAvailablein interface- INorFlashSectorState
 
- 
 
hasErasedHeader
public boolean hasErasedHeader()
- 
- Specified by:
- hasErasedHeaderin interface- INorFlashSectorState
 
- 
 
incrementAllocatedBlockCount
public void incrementAllocatedBlockCount()
- 
- Specified by:
- incrementAllocatedBlockCountin interface- INorFlashSectorState
 
- 
 
incrementFreedBlockCount
public void incrementFreedBlockCount()
- 
- Specified by:
- incrementFreedBlockCountin interface- INorFlashSectorState
 
- 
 
init
public void init(Address startAddress,
                 int size)
- 
 
- 
 
initState
protected void initState()
- 
 
- 
 
readBytes
public void readBytes(int offset,
                      byte[] buffer,
                      int bufferStart,
                      int bufferLength)
- 
- Specified by:
- readBytesin interface- INorFlashSectorState
 
- 
 
removeErasedHeader
public void removeErasedHeader()
                        throws RecordStoreException
- 
- Specified by:
- removeErasedHeaderin interface- INorFlashSectorState
 
- 
- Throws:
- RecordStoreException
 
resetHead
public void resetHead()
- 
- Specified by:
- resetHeadin interface- INorFlashSectorState
 
- 
 
setNextSector
public void setNextSector(INorFlashSectorState next)
- 
- Specified by:
- setNextSectorin interface- INorFlashSectorState
 
- 
 
setOwningList
public void setOwningList(INorFlashSectorStateList list)
- 
- Specified by:
- setOwningListin interface- INorFlashSectorState
 
- 
 
setWriteHeadPosition
public void setWriteHeadPosition(int position)
- 
- Specified by:
- setWriteHeadPositionin interface- INorFlashSectorState
 
- 
 
writeBytes
public void writeBytes(byte[] buffer,
                       int bufferStart,
                       int bufferLength)
- 
- Specified by:
- writeBytesin interface- INorFlashSectorState
 
- 
 
writeBytes
public void writeBytes(int offset,
                       byte[] buffer,
                       int bufferStart,
                       int bufferLength)
- 
- Specified by:
- writeBytesin interface- INorFlashSectorState
 
- 
 
"For updated information see the Java FRC site"