Remove dead-code readDvbString

parent 1d65afdd
...@@ -133,63 +133,4 @@ public class AitDecoder implements MetadataDecoder { ...@@ -133,63 +133,4 @@ public class AitDecoder implements MetadataDecoder {
return new Metadata(aits); return new Metadata(aits);
} }
static final String dvbCharset[] = {
"ISO-8859-15",
"ISO-8859-5",
"ISO-8859-6",
"ISO-8859-7",
"ISO-8859-8",
"ISO-8859-9",
null,
"ISO-8859-11",
null,
"ISO-8859-13",
null,
"ISO-8859-15",
null,
null,
null,
null,
//0x10
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
};
static String readDvbString(ParsableByteArray data, int length) {
if(length == 0) return null;
int charsetSelect = data.peekUnsignedByte();
if(charsetSelect >= 0x20)
return data.readString(length, Charset.forName("ISO-8859-15"));
data.skipBytes(1);
if(charsetSelect == 0x1f) {
data.skipBytes(length - 1);
return null;
}
if(charsetSelect != 0x10)
return data.readString(length-1, Charset.forName(dvbCharset[charsetSelect]));
if(length == 2) {
data.skipBytes(1);
return null;
}
charsetSelect = data.readUnsignedShort();
if(charsetSelect > 1 && charsetSelect < 0x10) {
String charsetName = "ISO-8859-" + charsetSelect;
return data.readString(length-3, Charset.forName(charsetName));
}
return null;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment