Package flash.swf

Examples of flash.swf.TagDecoder


    try
    {
      in = new BufferedInputStream(new FileInputStream(application));
     
      Movie movie = new Movie();
      new TagDecoder(in).parse(new MovieDecoder(movie));
     
      info = new ApplicationInfoImpl(movie);
    }
    catch (IOException ex)
    {
View Full Code Here


      if (encodeOption)
      {
        // decode -> encode -> decode -> print
        TagEncoder encoder = new TagEncoder();
        in = url.openStream();
        new TagDecoder(in, url).parse(encoder);
        encoder.finish();
        in = new ByteArrayInputStream(encoder.toByteArray());
      }
      else
      {
        // decode -> print
        in = url.openStream();
      }
      TagDecoder t = new TagDecoder(in, url);
      t.setKeepOffsets(debugPrinter.showOffset);
      t.parse(debugPrinter);
    }
View Full Code Here

  public static void main(String[] args) throws Exception
  {
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(args[0]));

    Movie movie = new Movie();
    new TagDecoder(in).parse(new MovieDecoder(movie));

    MovieMetaDataPrinter metadata = new MovieMetaDataPrinter();
    metadata.process(movie);

    System.out.println(metadata.toString());
View Full Code Here

      int swfSize = readU32(in);
      SizeLimitingInputStream in2 = new SizeLimitingInputStream(in, swfSize);

      Movie movie = new Movie();
      MovieDecoder movieDecoder = new MovieDecoder(movie);
      TagDecoder tagDecoder = new TagDecoder(in2);
      tagDecoder.parse(movieDecoder);

      // For some reason, sometimes the process of decoding the movie does not read
      // all that bytes that had been written previously.  So, skip to the end.
      in2.skipToEnd();
View Full Code Here

      if (encodeOption)
      {
        // decode -> encode -> decode -> print
        TagEncoder encoder = new TagEncoder();
        in = url.openStream();
        new TagDecoder(in, url).parse(encoder);
        encoder.finish();
        in = new ByteArrayInputStream(encoder.toByteArray());
      }
      else
      {
        // decode -> print
        in = url.openStream();
      }
      TagDecoder t = new TagDecoder(in, url);
      t.setKeepOffsets(debugPrinter.showOffset);
      t.parse(debugPrinter);
    }
View Full Code Here

            InputStream in = new BufferedInputStream(new FileInputStream(inputFile));
            System.out.println(input + " (" + inputFile.length() + " bytes)");
           
            // decoder
            Movie movie = new Movie();
            TagDecoder tagDecoder = new TagDecoder(in);
            MovieDecoder movieDecoder = new MovieDecoder(movie);
            tagDecoder.parse(movieDecoder);

            if (movie.version > 0) {
                // optimize
                flex2.tools.WebTierAPI.optimize(movie, configuration);
View Full Code Here

        InputStream inputStream = null;

        try
        {
            inputStream = swcFile.getInputStream();
            TagDecoder tagDecoder = new TagDecoder(inputStream);
            tagDecoder.parse( movieDecoder );
        }
        catch (IOException e)
        {
        }
        finally
View Full Code Here

    public SwfActionContainer(byte[] swf, byte[] swd)  { this(new ByteArrayInputStream(swf), new ByteArrayInputStream(swd))}
    public SwfActionContainer(InputStream swfIn)    { this(swfIn, null); }

    public SwfActionContainer(InputStream swfIn, InputStream swdIn)
  {
    TagDecoder p = new TagDecoder(swfIn, swdIn);
    try
    {
      process(p);
      errorProcessing = false;
    }
View Full Code Here

        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        te.writeTo(bos);

        // decode the movie and save the compilation time in the special handler
        ProductInfoTagHandler decodeHandler = new ProductInfoTagHandler();
        TagDecoder decoder = new TagDecoder(new ByteArrayInputStream(bos.toByteArray()));
        decoder.parse(decodeHandler);

        // verify that the compilation time after encode/decode is the same as when you set it
        assertEquals("time should be equivalent", time, decodeHandler.getProductInfo().getCompileDate());
    }
View Full Code Here

TOP

Related Classes of flash.swf.TagDecoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.