我有一个用于SIM卡OTA编程的CPS(卡片个性化规范)文件,其结构如下所示
FORMAT_VERSION:01.03
FILE_DATE:20130315150622
FILE_ID:BM00701x
SIMCardDataFormatVersion(03.01)
ConfigurationFile(bell.cfg)
SIMCardData("G&D_America")
{
CardProfile("BM618039V2.0.0")
{
SimVendor(G&D)
SfmProtocol(03.48_G&D)
Description("G&D UICC Profile")
SimApplication(SFM)
{
TAR(B00001)
Version(1.0)
PID(7F)
DCS(F6)
0348Settings(MobileTerminated)
{
MaxNumberOfConcatSm(5)
SPI1(0A)
SPI2(22)
CounterStartValue(1)
KIc(05)
KID(05)
PoRSupported(TRUE)
}
}
... pruned
我想将它们转换为像这样的xml文件
<SIMCardData name="G D_America">
<CardProfile name="BM618028V2.1.0">
<SimVendor>G&D</SimVendor>
<Description>G&D UICC OTA HTTP Profile with applets specified</Description>
<SimApplication name="USIM">
<TAR>B00002</TAR>
<Version>1.0</Version>
<AssociatedSimApplication>SFM</AssociatedSimApplication>
<Settings0348>
<MaxNumberOfConcatSm>5</MaxNumberOfConcatSm>
<SPI>0A</SPI>
<SPI2>22</SPI2>
<CounterStartValue>1</CounterStartValue>
<KIc>05</KIc>
<KID>05</KID>
<PoRSupported>TRUE</PoRSupported>
</Settings0348>
我通过JBoss ESB中的FS提供程序读取它们,并将CPS文件作为字节数组提供。是否有任何可用的包可以让我将bytearray解析为Java对象,我最终可以将其转换为xml?