com.sun.squawk.peripheral
Class SimulatedNorFlashSector
java.lang.Object
com.sun.squawk.peripheral.SimulatedNorFlashSector
- All Implemented Interfaces:
- INorFlashSector, IPeripheral
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.
- Author:
- Eric Arseneau
|
Method Summary |
void |
erase()
|
void |
getBytes(int memoryOffset,
byte[] buffer,
int bufferOffset,
int length)
|
byte |
getErasedValue()
|
int |
getPurpose()
|
int |
getSize()
|
Address |
getStartAddress()
|
protected void |
init(Address startAddress,
int size,
int purpose)
|
static void |
installSectors(int numberOfSectors,
int sectorSize,
int purpose)
|
void |
setBytes(int memoryOffset,
byte[] buffer,
int bufferOffset,
int length)
|
static void |
setupSectors(int numberOfSectors,
int sectorSize,
int purpose,
boolean useFiles)
|
static void |
uninstallSectors()
|
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
bytes
protected byte[] bytes
fileName
protected String fileName
purpose
protected int purpose
size
protected int size
startAddress
protected Address startAddress
SimulatedNorFlashSector
public SimulatedNorFlashSector(Address startAddress,
int size,
int purpose,
boolean useFile)
SimulatedNorFlashSector
public SimulatedNorFlashSector(Address startAddress,
byte[] bytes,
int purpose)
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)
installSectors
public static void installSectors(int numberOfSectors,
int sectorSize,
int purpose)
setBytes
public void setBytes(int memoryOffset,
byte[] buffer,
int bufferOffset,
int length)
- Specified by:
setBytes in interface INorFlashSector
setupSectors
public static void setupSectors(int numberOfSectors,
int sectorSize,
int purpose,
boolean useFiles)
uninstallSectors
public static void uninstallSectors()
Copyright © 2007 Sun Microsystems, Inc. All Rights Reserved.