| 1 | |
package org.jaudiotagger.tag.datatype; |
| 2 | |
|
| 3 | |
import org.jaudiotagger.tag.InvalidDataTypeException; |
| 4 | |
import org.jaudiotagger.tag.id3.AbstractTagFrameBody; |
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | 6 | public class PairedTextEncodedStringNullTerminated extends MultipleTextEncodedStringNullTerminated |
| 12 | |
{ |
| 13 | |
public PairedTextEncodedStringNullTerminated(String identifier, AbstractTagFrameBody frameBody) |
| 14 | |
{ |
| 15 | 18 | super(identifier, frameBody); |
| 16 | 18 | value = new PairedTextEncodedStringNullTerminated.ValuePairs(); |
| 17 | 18 | } |
| 18 | |
|
| 19 | |
public PairedTextEncodedStringNullTerminated(TextEncodedStringSizeTerminated object) |
| 20 | |
{ |
| 21 | 0 | super(object); |
| 22 | 0 | value = new PairedTextEncodedStringNullTerminated.ValuePairs(); |
| 23 | 0 | } |
| 24 | |
|
| 25 | |
public PairedTextEncodedStringNullTerminated(PairedTextEncodedStringNullTerminated object) |
| 26 | |
{ |
| 27 | 1 | super(object); |
| 28 | 1 | } |
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
public void readByteArray(byte[] arr, int offset) throws InvalidDataTypeException |
| 40 | |
{ |
| 41 | 6 | logger.finer("Reading PairedTextEncodedStringNullTerminated from array from offset:" + offset); |
| 42 | 6 | super.readByteArray(arr, offset); |
| 43 | 6 | logger.finer("Read PairedTextEncodedStringNullTerminated from array from offset:"); |
| 44 | 6 | } |
| 45 | |
|
| 46 | |
|
| 47 | |
|
| 48 | |
|
| 49 | |
public static class ValuePairs extends MultipleTextEncodedStringNullTerminated.Values |
| 50 | |
{ |
| 51 | |
public ValuePairs() |
| 52 | |
{ |
| 53 | 22 | super(); |
| 54 | 22 | } |
| 55 | |
|
| 56 | |
|
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
public int getNumberOfPairs() |
| 61 | |
{ |
| 62 | 2 | if(this.getNumberOfValues()>0) |
| 63 | |
{ |
| 64 | 2 | return this.getNumberOfValues() / 2; |
| 65 | |
} |
| 66 | 0 | return 0; |
| 67 | |
} |
| 68 | |
} |
| 69 | |
|
| 70 | |
public ValuePairs getValue() |
| 71 | |
{ |
| 72 | 21 | return (ValuePairs)value; |
| 73 | |
} |
| 74 | |
|
| 75 | |
|
| 76 | |
} |