Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * @param sis
  * @param data
  * @throws IOException
  */
 public ExporterInfoTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
   super(sis.getSwf(), ID, "ExporterInfo", data);
   this.version = sis.readUI16("version");
   if (this.version >= 0x10a) {
     flags = sis.readUI32("flags");
   }
   bitmapFormat = sis.readUI16("bitmapFormat");
   int prefixLen = sis.readUI8("prefixLen");
   prefix = sis.readBytesEx(prefixLen, "prefix");
   int swfNameLen = sis.readUI8("swfNameLen");
   swfName = new String(sis.readBytesEx(swfNameLen, "swfName"));
   if (sis.available() > 0) // (version >= 0x401) //?
   {
     codeOffsets = new ArrayList<>();
     int numCodeOffsets = sis.readUI16("numCodeOffsets");
     for (int i = 0; i < numCodeOffsets; i++) {
       codeOffsets.add(sis.readUI32("codeOffset"));
     }
   }
 }
 @Override
 public final void readData(
     SWFInputStream sis,
     ByteArrayRange data,
     int level,
     boolean parallel,
     boolean skipUnusualTags,
     boolean lazy)
     throws IOException {
   characterId = sis.readUI32("characterId");
   bitmapFormat = sis.readUI16("bitmapFormat");
   targetWidth = sis.readUI16("targetWidth");
   targetHeight = sis.readUI16("targetHeight");
   exportName = sis.readNetString("exportName");
   fileName = sis.readNetString("fileName");
   if (sis.available() > 0) { // there is usually one zero byte, bod knows why
     extraData = sis.readBytesEx(sis.available(), "extraData");
   }
 }