com.sun.squawk.peripheral
Class SimulatedNorFlashSector
java.lang.Object
com.sun.squawk.peripheral.SimulatedNorFlashSector
- All Implemented Interfaces:
- INorFlashSector
public class SimulatedNorFlashSector
- extends Object
- implements INorFlashSector
I am a class that allows the RMS store to be used in Java heap as a byte array. This is to
theoretically simplify testing.
SECTORS_FILE_EXTENSION
public static final String SECTORS_FILE_EXTENSION
- See Also:
- Constant Field Values
ZERO_PADDING
public static final String ZERO_PADDING
- See Also:
- Constant Field Values
purpose
protected int purpose
size
protected int size
startAddress
protected Address startAddress
bytes
protected byte[] bytes
fileName
protected String fileName
SimulatedNorFlashSector
public SimulatedNorFlashSector(Address startAddress,
byte[] bytes,
int purpose)
SimulatedNorFlashSector
public SimulatedNorFlashSector(Address startAddress,
int size,
int purpose,
boolean useFile)
SimulatedNorFlashSector
public SimulatedNorFlashSector(String fileName)
throws IOException
- Throws:
IOException
erase
public void erase()
- Specified by:
erase
in interface INorFlashSector
getBytes
public void getBytes(int memoryOffset,
byte[] buffer,
int bufferOffset,
int length)
- Specified by:
getBytes
in interface INorFlashSector
getErasedValue
public byte getErasedValue()
- Specified by:
getErasedValue
in interface INorFlashSector
getPurpose
public int getPurpose()
- Specified by:
getPurpose
in interface INorFlashSector
getSize
public int getSize()
- Specified by:
getSize
in interface INorFlashSector
getStartAddress
public Address getStartAddress()
- Specified by:
getStartAddress
in interface INorFlashSector
init
protected void init(Address startAddress,
int size,
int purpose)
setBytes
public void setBytes(int memoryOffset,
byte[] buffer,
int bufferOffset,
int length)
- Specified by:
setBytes
in interface INorFlashSector
"For updated information see the Java FRC site"