}
private void createAndPassDescriptorTag()
throws HandlerException {
InputStream myInputStream = null;
Tag descriptorTag = new Tag();
byte[] payload = new byte[0];
try {
DataReference myDataReference = dataReferenceStack.pop();
myInputStream = myDataReference.createInputStream();
payload = BinaryTools.readByteArray(myInputStream, (int) myDataReference.getLength());
myInputStream.close();
myInputStream = null;
myInputStream = dataReferenceStack.pop().createInputStream();
descriptorTag.DescriptorVersion = (int) BinaryTools.readUInt32AsLong(myInputStream);
myInputStream.close();
myInputStream = null;
myInputStream = dataReferenceStack.pop().createInputStream();
descriptorTag.TagSerialNumber = (int) BinaryTools.readUInt32AsLong(myInputStream);
myInputStream.close();
myInputStream = null;
myInputStream = dataReferenceStack.pop().createInputStream();
descriptorTag.TagLocation = BinaryTools.readUInt32AsLong(myInputStream);
myInputStream.close();
myInputStream = null;
myInputStream = dataReferenceStack.pop().createInputStream();
descriptorTag.TagIdentifier = (int) BinaryTools.readUInt32AsLong(myInputStream);
myInputStream.close();
myInputStream = null;
}
catch (IOException myIOException) {
throw new HandlerException(myIOException);
}
finally {
if (myInputStream != null) {
try {
myInputStream.close();
}
catch (IOException myIOException) {
}
}
}
descriptorTag.DescriptorCRCLength = payload.length;
descriptorTag.DescriptorCRC = Checksum.cksum(payload);
super.data(new ByteArrayDataReference(descriptorTag.getBytes()));
super.data(new ByteArrayDataReference(payload));
}