ztex
Class IhxFile

java.lang.Object
  extended by ztex.IhxFile
Direct Known Subclasses:
ZtexIhxFile1

public class IhxFile
extends java.lang.Object

A class representing a firmware image loaded from an ihx (Intel Hex format) file.


Field Summary
 short[] ihxData
          This array stores the firmware image.
 
Constructor Summary
IhxFile(java.io.InputStream in, java.lang.String name)
          Constructs an instance from a given file name.
IhxFile(java.lang.String fileName)
          Constructs an instance from a given file name.
 
Method Summary
 void dataInfo(java.io.PrintStream out)
          Print out some information about the memory usage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ihxData

public short[] ihxData
This array stores the firmware image. Values <0 and >255 mean that the data is undefined.

Constructor Detail

IhxFile

public IhxFile(java.io.InputStream in,
               java.lang.String name)
        throws java.io.IOException,
               IhxFileDamagedException
Constructs an instance from a given file name. This method can also read system resources, e.g. files from the current jar archive.

Parameters:
in - Input stream from which the ihx file is read.
name - Name of the input.
Throws:
java.io.IOException - If an read error occurred.
IhxFileDamagedException - If the ihx file is damaged.

IhxFile

public IhxFile(java.lang.String fileName)
        throws java.io.IOException,
               IhxFileDamagedException
Constructs an instance from a given file name. This method can also read system resources, e.g. files from the current jar archive.

Parameters:
fileName - The file name.
Throws:
java.io.IOException - If an read error occurred.
IhxFileDamagedException - If the ihx file is damaged.
Method Detail

dataInfo

public void dataInfo(java.io.PrintStream out)
Print out some information about the memory usage.

Parameters:
out - Where the data is printed out.