public class EvioBank extends BaseStructure implements java.lang.Cloneable
BankHeader
) and the raw data stored as an
byte array.Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
attachment
For general convenience, allow an object to be attached to an evio bank.
|
static java.lang.String |
ELEMENT_NAME
The XML record tag for a segment.
|
badStringFormat, byteOrder, charData, children, compositeData, doubleData, floatData, header, intData, isLeaf, lengthsUpToDate, longData, numberDataItems, rawBytes, shortData, stringData, stringEnd, stringsList, xmlContentAttributeName, xmlElementName, xmlIndent
Constructor and Description |
---|
EvioBank()
Null constructor for a bank.
|
EvioBank(BankHeader bankHeader)
Constructor using a provided BankHeader
|
EvioBank(int tag,
DataType dataType,
int num)
This is the general constructor to use for a Bank.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Deep clone of BaseStructure does all of the work for us.
|
java.lang.Object |
getAttachment()
Get the attached object.
|
StructureType |
getStructureType()
This implements the abstract method from
BaseStructure . |
java.lang.String |
getXMLElementName()
Get the element name for the bank for writing to XML.
|
void |
setAttachment(java.lang.Object attachment)
Set the attached object.
|
(package private) byte[] |
toArray()
Write myself out as a byte array of evio format data
in the byte order given by
BaseStructure.getByteOrder() . |
void |
toXML(javax.xml.stream.XMLStreamWriter xmlWriter)
Write this bank structure out as an XML record.
|
void |
toXML(javax.xml.stream.XMLStreamWriter xmlWriter,
boolean hex)
Write this bank structure out as an XML record.
|
appendByteData, appendByteData, appendCompositeData, appendDoubleData, appendDoubleData, appendFloatData, appendFloatData, appendIntData, appendIntData, appendLongData, appendLongData, appendShortData, appendShortData, appendStringData, appendStringData, children, childrenToXML, commonXMLClose, commonXMLDataWrite, commonXMLStart, dataLength, decreaseXmlIndent, getAllowsChildren, getByteData, getByteOrder, getChildAt, getChildCount, getChildren, getChildrenList, getCompositeData, getDescription, getDoubleData, getFloatData, getHeader, getIndex, getIntData, getLongData, getMatchingStructures, getNumberDataItems, getParent, getRawBytes, getShortData, getStringData, getTotalBytes, increaseXmlIndent, insert, insert, isContainer, isLeaf, isSwap, lengthsUpToDate, lengthsUpToDate, remove, remove, removeFromParent, setAllHeaderLengths, setByteData, setByteData, setByteOrder, setCompositeData, setDoubleData, setDoubleData, setFloatData, setFloatData, setIntData, setIntData, setLongData, setLongData, setParent, setRawBytes, setShortData, setShortData, setStringData, setUserObject, setXmlIndent, setXmlNames, stringsToRawBytes, stringsToRawSize, toString, toXML, toXML, transform, unpackRawBytesToStrings, unpackRawBytesToStrings, unpackRawBytesToStrings, visitAllStructures, visitAllStructures, write
public static final java.lang.String ELEMENT_NAME
protected transient java.lang.Object attachment
public EvioBank()
public EvioBank(BankHeader bankHeader)
bankHeader
- the header to use.BankHeader
public EvioBank(int tag, DataType dataType, int num)
tag
- the tag for the bank header.dataType
- the (enum) data type for the content of the bank.num
- sometimes, but not necessarily, an ordinal enumeration.public java.lang.Object getAttachment()
public void setAttachment(java.lang.Object attachment)
attachment
- object to attach to this bankpublic StructureType getStructureType()
BaseStructure
. It is a convenience method use instead of
"instanceof" to see what type of structure we have. Note: this returns the type of this structure, not the type
of data this structure holds.getStructureType
in interface IEvioStructure
getStructureType
in class BaseStructure
StructureType
of this structure, which is a StructureType.BANK.StructureType
public void toXML(javax.xml.stream.XMLStreamWriter xmlWriter)
toXML
in class BaseStructure
xmlWriter
- the writer used to write the events.public void toXML(javax.xml.stream.XMLStreamWriter xmlWriter, boolean hex)
toXML
in class BaseStructure
xmlWriter
- the writer used to write the events.hex
- if true, ints get displayed in hexadecimalpublic java.lang.String getXMLElementName()
getXMLElementName
in class BaseStructure
byte[] toArray()
BaseStructure.getByteOrder()
.
This method is much more efficient than using BaseStructure.write(java.nio.ByteBuffer)
.However, be warned that this method is only useful when a bank has just been read from a file or buffer. Once the user adds data or children to the bank, this method does NOT produce correct results.
public java.lang.Object clone()
clone
in class BaseStructure