Exemplo n.º 1
0
 public SimulatedNorFlashSector(String fileName) throws IOException {
   this.fileName = fileName;
   DataInputStream input = Connector.openDataInputStream("file://" + fileName);
   Address startAddress = Address.fromPrimitive(input.readInt());
   int size = input.readInt();
   int purpose = input.readShort();
   init(startAddress, size, purpose);
   bytes = new byte[input.available()];
   input.read(bytes, 0, bytes.length);
   input.close();
 }