public int read(DataInputStream istream) throws IOException {
    preRead();
    int retVal = 0;

    DataInputStream saved = istream;
    int sizeLimit = getHeader().length + (0);
    if (sizeLimit > 0) {
      byte[] ba = new byte[sizeLimit];
      istream.readFully(ba);
      ByteArrayInputStream baTemp = new ByteArrayInputStream(ba);
      istream = new DataInputStream(baTemp);
      {
        // read desc_header
        retVal += desc_header.read(istream);
        // read service_id
        {
          service_id = BinPrimitive.readUI24(istream);
          retVal += 3;
        }
        // read bf1
        retVal += bf1.read(istream);
        // read service_name
        {
          retVal += service_name.read(istream);
        }
      }
    }
    istream = saved;
    postRead();
    return retVal;
  }
Exemplo n.º 2
0
  public int read(DataInputStream istream) throws IOException {
    preRead();
    int retVal = 0;

    // read header
    retVal += header.read(istream);
    // read length
    {
      length = (short) (istream.readUnsignedByte());
      retVal += 1;
    }
    // read caPmtlisMngement
    {
      caPmtlisMngement = (short) (istream.readUnsignedByte());
      retVal += 1;
    }
    // read programNumber
    {
      programNumber = istream.readUnsignedShort();
      retVal += 2;
    }
    // read bf1
    retVal += bf1.read(istream);
    // read bf2
    retVal += bf2.read(istream);
    // read StatusfieldCheckInstance
    if (getProgramInfoLength() != 0) {
      StatusfieldCheckInstance = new StatusfieldCheck(this);
      retVal += StatusfieldCheckInstance.read(istream);
    }
    // read CaEntries
    for (; istream.available() > 0; ) {
      CaPmtModeMsg temp;
      temp = new CaPmtModeMsg();
      retVal += temp.read(istream);
      CaEntries.add(temp);
    }

    postRead();
    return retVal;
  }