/** * 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)); }
public void addPair(String text) { PairedTextEncodedStringNullTerminated.ValuePairs value = ((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).getValue(); StringTokenizer stz = new StringTokenizer(text, "\0"); if (stz.hasMoreTokens()) { value.add(stz.nextToken(), stz.nextToken()); } }
/** * Because have a text encoding we need to check the data values do not contain characters that cannot be encoded in * current encoding before we write data. If they do change the encoding. */ public void write(ByteArrayOutputStream tagBuffer) { if (!((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).canBeEncoded()) { this.setTextEncoding(TextEncoding.UTF_16); } super.write(tagBuffer); }
/** * Because have a text encoding we need to check the data values do not contain characters that cannot be encoded in * current encoding before we write data. If they do change the encoding. */ public void write(ByteArrayOutputStream tagBuffer) { if (!((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).canBeEncoded()) { this.setTextEncoding(TextEncoding.UTF_16); } super.write(tagBuffer); }
/** * Parse text as a null separated pairing of name and function * * @param text */ public void addPair(String text) { PairedTextEncodedStringNullTerminated.ValuePairs value = ((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).getValue(); StringTokenizer stz = new StringTokenizer(text, "\0"); if (stz.countTokens() == 2) { addPair(stz.nextToken(), stz.nextToken()); } }
/** * Because have a text encoding we need to check the data values do not contain characters that cannot be encoded in * current encoding before we write data. If they do change the encoding. */ public void write(ByteArrayOutputStream tagBuffer) { if (!((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).canBeEncoded()) { this.setTextEncoding(TextEncoding.UTF_16); } super.write(tagBuffer); }
/** * 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)); }
public void addPair(String text) { PairedTextEncodedStringNullTerminated.ValuePairs value = ((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).getValue(); StringTokenizer stz = new StringTokenizer(text, "\0"); if (stz.hasMoreTokens()) { value.add(stz.nextToken(),stz.nextToken()); } }
/** * Because have a text encoding we need to check the data values do not contain characters that cannot be encoded in * current encoding before we write data. If they do change the encoding. */ public void write(ByteArrayOutputStream tagBuffer) { if (!((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).canBeEncoded()) { this.setTextEncoding(TextEncoding.UTF_16); } super.write(tagBuffer); }
/** * 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)); }
public void addPair(String text) { PairedTextEncodedStringNullTerminated.ValuePairs value = ((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).getValue(); StringTokenizer stz = new StringTokenizer(text, "\0"); if (stz.hasMoreTokens()) { value.add(stz.nextToken(),stz.nextToken()); } }
/** * Because have a text encoding we need to check the data values do not contain characters that cannot be encoded in * current encoding before we write data. If they do change the encoding. */ public void write(ByteArrayOutputStream tagBuffer) { if (!((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).canBeEncoded()) { this.setTextEncoding(TextEncoding.UTF_16); } super.write(tagBuffer); }
/** * 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)); }
/** * Remove all Pairs */ public void resetPairs() { PairedTextEncodedStringNullTerminated.ValuePairs value = ((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).getValue(); value.getMapping().clear(); }
/** * 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)); }
/** * Remove all Pairs */ public void resetPairs() { PairedTextEncodedStringNullTerminated.ValuePairs value = ((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).getValue(); value.getMapping().clear(); }
/** * @return number of text pairs */ public int getNumberOfPairs() { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return text.getValue().getNumberOfPairs(); }
/** * Add pair * * @param function * @param name */ public void addPair(String function,String name) { PairedTextEncodedStringNullTerminated.ValuePairs value = ((PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT)).getValue(); value.add(function, name); }
/** * @return number of text pairs */ public int getNumberOfPairs() { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return text.getValue().getNumberOfPairs(); }
/** * @return number of text pairs */ public int getNumberOfPairs() { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return text.getValue().getNumberOfPairs(); }