/** * Add String Data type to the value list * * @param value to add to the list */ public void add(String key, String value) { mapping.add(new Pair(key,value)); }
meta.add(new Pair(META_KEY_CODEC, trackData.getCodec())); meta.add(new Pair(META_KEY_ENCODER, trackData.getEncoder())); for (int i = 0; i < field.getValue().size(); i++) { String value = field.getValue().get(i); meta.add(new Pair(field.getKey().toString(), value)); dos.writeUTF(pair.getKey()); dos.writeUTF(pair.getValue());
/** * Get key at index * * @param index * @return value at index */ public String getKeyAtIndex(int index) { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return text.getValue().getMapping().get(index).getKey(); }
/** * Check the value can be encoded with the specified encoding * * @return */ public boolean canBeEncoded() { for (Pair entry : ((ValuePairs) value).mapping) { TextEncodedStringNullTerminated next = new TextEncodedStringNullTerminated(identifier, frameBody, entry.getValue()); if (!next.canBeEncoded()) { return false; } } return true; }
/** * Get key at index * * @param index * @return value at index */ public String getKeyAtIndex(int index) { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return text.getValue().getMapping().get(index).getKey(); }
/** * Get value at index * * @param index * @return value at index */ public String getValueAtIndex(int index) { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return (String) text.getValue().getMapping().get(index).getValue(); }
/** * Return the list of values as a single string separated by a colon,comma * * @return a string representation of the value */ public String toString() { StringBuffer sb = new StringBuffer(); for (Pair next : mapping) { sb.append(next.getKey() + ':' + next.getValue() + ','); } return sb.toString(); }
/** * Get key at index * * @param index * @return value at index */ public String getKeyAtIndex(int index) { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return (String) text.getValue().getMapping().get(index).getKey(); }
/** * Get value at index * * @param index * @return value at index */ public String getValueAtIndex(int index) { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return text.getValue().getMapping().get(index).getValue(); }
/** * Add String Data type to the value list * * @param value to add to the list */ public void add(String key, String value) { mapping.add(new Pair(key, value)); }
/** * Get key at index * * @param index * @return value at index */ public String getKeyAtIndex(int index) { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return text.getValue().getMapping().get(index).getKey(); }
/** * Get value at index * * @param index * @return value at index */ public String getValueAtIndex(int index) { PairedTextEncodedStringNullTerminated text = (PairedTextEncodedStringNullTerminated) getObject(DataTypes.OBJ_TEXT); return (String) text.getValue().getMapping().get(index).getValue(); }
/** * Add String Data type to the value list * * @param value to add to the list */ public void add(String key, String value) { mapping.add(new Pair(key,value)); }
/** * Return the list of values as a single string separated by a colon,comma * * @return a string representation of the value */ public String toString() { StringBuffer sb = new StringBuffer(); for(Pair next:mapping) { sb.append(next.getKey()+':'+next.getValue()+','); } if(sb.length()>0) { sb.setLength(sb.length() - 1); } return sb.toString(); }