com.sun.squawk.flash
Class NorFlashSectorState
java.lang.Object
com.sun.squawk.flash.NorFlashSectorState
- All Implemented Interfaces:
- INorFlashSectorState
public class NorFlashSectorState
- extends Object
- implements INorFlashSectorState
- Author:
- ea149956
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)
|
BUFFER
public static final byte[] BUFFER
ERASED_HEADER
public static final byte[] ERASED_HEADER
ERASED_HEADER_SIZE
public static final int ERASED_HEADER_SIZE
endAddress
protected Address endAddress
flashSector
protected INorFlashSector flashSector
freedBlockCount
protected int freedBlockCount
hasErasedHeader
protected boolean hasErasedHeader
mallocedBlockCount
protected int mallocedBlockCount
nextSector
protected INorFlashSectorState nextSector
owningList
protected INorFlashSectorStateList owningList
sequence
protected long sequence
startAddress
protected Address startAddress
writeHead
protected int writeHead
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:
decrementMallocedCount
in interface INorFlashSectorState
erase
public void erase(long sequence)
throws RecordStoreException
- Specified by:
erase
in interface INorFlashSectorState
- Throws:
RecordStoreException
forceErase
public void forceErase()
throws RecordStoreException
- Specified by:
forceErase
in interface INorFlashSectorState
- Throws:
RecordStoreException
getAllocatedBlockCount
public int getAllocatedBlockCount()
- Specified by:
getAllocatedBlockCount
in interface INorFlashSectorState
getEndAddress
public Address getEndAddress()
- Specified by:
getEndAddress
in interface INorFlashSectorState
getFreedBlockCount
public int getFreedBlockCount()
- Specified by:
getFreedBlockCount
in interface INorFlashSectorState
getNextSector
public INorFlashSectorState getNextSector()
- Specified by:
getNextSector
in interface INorFlashSectorState
getOwningList
public INorFlashSectorStateList getOwningList()
- Specified by:
getOwningList
in interface INorFlashSectorState
getSequence
public long getSequence()
- Specified by:
getSequence
in interface INorFlashSectorState
getSize
public int getSize()
- Specified by:
getSize
in interface INorFlashSectorState
getStartAddress
public Address getStartAddress()
- Specified by:
getStartAddress
in interface INorFlashSectorState
getWriteHeadAddress
public Address getWriteHeadAddress()
- Specified by:
getWriteHeadAddress
in interface INorFlashSectorState
getWriteHeadPosition
public int getWriteHeadPosition()
- Specified by:
getWriteHeadPosition
in interface INorFlashSectorState
hasAvailable
public boolean hasAvailable(int length)
- Specified by:
hasAvailable
in interface INorFlashSectorState
hasErasedHeader
public boolean hasErasedHeader()
- Specified by:
hasErasedHeader
in interface INorFlashSectorState
incrementAllocatedBlockCount
public void incrementAllocatedBlockCount()
- Specified by:
incrementAllocatedBlockCount
in interface INorFlashSectorState
incrementFreedBlockCount
public void incrementFreedBlockCount()
- Specified by:
incrementFreedBlockCount
in 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:
readBytes
in interface INorFlashSectorState
removeErasedHeader
public void removeErasedHeader()
throws RecordStoreException
- Specified by:
removeErasedHeader
in interface INorFlashSectorState
- Throws:
RecordStoreException
resetHead
public void resetHead()
- Specified by:
resetHead
in interface INorFlashSectorState
setNextSector
public void setNextSector(INorFlashSectorState next)
- Specified by:
setNextSector
in interface INorFlashSectorState
setOwningList
public void setOwningList(INorFlashSectorStateList list)
- Specified by:
setOwningList
in interface INorFlashSectorState
setWriteHeadPosition
public void setWriteHeadPosition(int position)
- Specified by:
setWriteHeadPosition
in interface INorFlashSectorState
writeBytes
public void writeBytes(int offset,
byte[] buffer,
int bufferStart,
int bufferLength)
- Specified by:
writeBytes
in interface INorFlashSectorState
writeBytes
public void writeBytes(byte[] buffer,
int bufferStart,
int bufferLength)
- Specified by:
writeBytes
in interface INorFlashSectorState
Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.