public class ZtexImgFile1 extends ImgFile
ZtexDevice1
.ZtexDevice1
,
Ztex1
data, isFx3, startVector
Constructor and Description |
---|
ZtexImgFile1(java.io.InputStream in,
java.lang.String name)
Constructs an instance from a given file name and descriptor position.
|
ZtexImgFile1(java.lang.String fileName)
Constructs an instance from a given file name.
|
Modifier and Type | Method and Description |
---|---|
int |
fwVersion()
Returns the firmware version.
|
byte[] |
interfaceCapabilities()
Returns the interface capabilities (all 6 bytes).
|
int |
interfaceCapabilities(int i)
Returns byte i of the interface capabilities.
|
int |
interfaceVersion()
Returns the interface version.
|
byte[] |
moduleReserved()
Returns the application specific information (all 12 bytes).
|
int |
moduleReserved(int i)
Returns byte i of the application specific information.
|
byte[] |
productId()
Returns the product ID (all 4 bytes).
|
int |
productId(int i)
Returns byte i of the product ID.
|
void |
setSnString(java.lang.String s)
Modifies the serial number string.
|
java.lang.String |
snString()
Returns the serial number string.
|
java.lang.String |
toString()
Returns a string representation if the instance.
|
dataInfo, uncompressAddr
public ZtexImgFile1(java.io.InputStream in, java.lang.String name) throws java.io.IOException, ImgFileDamagedException, IncompatibleFirmwareException
in
- Input stream from which the img file is read.name
- Name of the input.java.io.IOException
- If an read error occurred.ImgFileDamagedException
- If the firmware file is damaged.IncompatibleFirmwareException
- If the firmware image contains no valid ZTEX descriptor 1 at the specified position.public ZtexImgFile1(java.lang.String fileName) throws java.io.IOException, ImgFileDamagedException, IncompatibleFirmwareException
fileName
- The file name.java.io.IOException
- If an read error occurred.ImgFileDamagedException
- If the firmware file is damaged.IncompatibleFirmwareException
- If the firmware image contains no valid ZTEX descriptor 1 at the specified position.public final byte[] productId()
ZtexDevice1
.public int productId(int i)
i
- indexZtexDevice1
.public final int fwVersion()
ZtexDevice1
.public final int interfaceVersion()
ZtexDevice1
.public final byte[] interfaceCapabilities()
ZtexDevice1
.public final int interfaceCapabilities(int i)
i
- indexZtexDevice1
.public final byte[] moduleReserved()
ZtexDevice1
.public final int moduleReserved(int i)
i
- indexZtexDevice1
.public final java.lang.String snString()
ZtexDevice1
.public final void setSnString(java.lang.String s) throws IncompatibleFirmwareException
s
- The new serial number string which must not be longer then 10 characters.IncompatibleFirmwareException
- if String cannot be saved.public java.lang.String toString()
toString
in class java.lang.Object