/** * Setup the Object List. All text frames contain a text encoding * and then a text string. * <p/> * TODO:would like to make final but cannot because overridden by FrameBodyTXXX */ protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new TextEncodedStringSizeTerminated(DataTypes.OBJ_TEXT, this)); } }
@Override public byte[] writeByteArray() { final byte[] typeData = this.type.writeByteArray(); final byte[] timeData = this.timestamp.writeByteArray(); if (typeData == null || timeData == null) return null; final byte[] objectData = new byte[typeData.length + timeData.length]; System.arraycopy(typeData, 0, objectData, 0, typeData.length); System.arraycopy(timeData, 0, objectData, typeData.length, timeData.length); return objectData; }
@Override public void readByteArray(final byte[] buffer, final int originalOffset) throws InvalidDataTypeException { int localOffset = originalOffset; int size = getSize(); logger.finest("offset:" + localOffset); //The read has extended further than the defined frame size (ok to extend upto //size because the next datatype may be of length 0.) if (originalOffset > buffer.length-size) { logger.warning("Invalid size for FrameBody"); throw new InvalidDataTypeException("Invalid size for FrameBody"); } this.type.readByteArray(buffer, localOffset); localOffset += this.type.getSize(); this.timestamp.readByteArray(buffer, localOffset); localOffset += this.timestamp.getSize(); }
public void setType(final int type) { this.type.setValue(type); }
public int getType() { return ((Number) type.getValue()).intValue(); }
@Override public void setBody(final AbstractTagFrameBody frameBody) { super.setBody(frameBody); this.type.setBody(frameBody); this.timestamp.setBody(frameBody); }
public EventTimingCode(final String identifier, final AbstractTagFrameBody frameBody, final int type, final long timestamp) { super(identifier, frameBody); setBody(frameBody); this.type.setValue(type); this.timestamp.setValue(timestamp); }
protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new PartOfSet(DataTypes.OBJ_TEXT, this)); } }
protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new PartOfSet(DataTypes.OBJ_TEXT, this)); } }
/** * */ protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TIME_STAMP_FORMAT, this, EventTimingTimestampTypes.TIMESTAMP_KEY_FIELD_SIZE)); objectList.add(new NumberVariableLength(DataTypes.OBJ_POSITION, this, 1)); } }
@Override protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TIME_STAMP_FORMAT, this, EventTimingTimestampTypes.TIMESTAMP_KEY_FIELD_SIZE)); objectList.add(new SynchronisedTempoCodeList(this)); } }
protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TIME_STAMP_FORMAT, this, EventTimingTimestampTypes.TIMESTAMP_KEY_FIELD_SIZE)); objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this)); } }
/** * Setup the Object List. All text frames contain a text encoding * and then a text string. * <p/> * TODO:would like to make final but cannot because overridden by FrameBodyTXXX */ protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new TextEncodedStringSizeTerminated(DataTypes.OBJ_TEXT, this)); } }
/** * Consists of a text encoding , and then a series of null terminated Strings, there should be an even number * of Strings as they are paired as involvement/involvee */ protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new PairedTextEncodedStringNullTerminated(DataTypes.OBJ_TEXT, this)); }
protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new TCONString(DataTypes.OBJ_TEXT, this)); }
protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new PartOfSet(DataTypes.OBJ_TEXT, this)); } }
/** * Setup the Object List. All text frames contain a text encoding * and then a text string. * * TODO:would like to make final but cannot because overridden by FrameBodyTXXX */ protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new TextEncodedStringSizeTerminated(DataTypes.OBJ_TEXT, this)); } }
/** * Consists of a text encoding , and then a series of null terminated Strings, there should be an even number * of Strings as they are paired as involvement/involvee */ protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TEXT_ENCODING, this, TextEncoding.TEXT_ENCODING_FIELD_SIZE)); objectList.add(new PairedTextEncodedStringNullTerminated(DataTypes.OBJ_TEXT, this)); }
/** * */ protected void setupObjectList() { objectList.add(new NumberHashMap(DataTypes.OBJ_TIME_STAMP_FORMAT, this, EventTimingTimestampTypes.TIMESTAMP_KEY_FIELD_SIZE)); objectList.add(new NumberVariableLength(DataTypes.OBJ_POSITION, this, 1)); } }