pt.tumba.parser.swf
Class SWF2HTML

java.lang.Object
  extended by pt.tumba.parser.swf.SWFTagTypesImpl
      extended by pt.tumba.parser.swf.SWF2HTML
All Implemented Interfaces:
DocFilter, SWFHeader, SWFSpriteTagTypes, SWFTags, SWFTagTypes

public class SWF2HTML
extends SWFTagTypesImpl
implements DocFilter

Description of the Class

Author:
bmartins

Nested Class Summary
 class SWF2HTML.TextDumper
          Description of the Class
 
Field Summary
protected  java.util.Map fontCodes
          Description of the Field
protected  java.io.PrintWriter output
          Description of the Field
private  int sizeCount
           
 
Fields inherited from class pt.tumba.parser.swf.SWFTagTypesImpl
tags
 
Constructor Summary
SWF2HTML()
          Constructor for the SWF2HTML object
 
Method Summary
 java.lang.String convertSWFToHTML(byte[] b2)
          Description of the Method
 java.lang.String convertSWFToHTML(java.io.File in)
          Description of the Method
 java.lang.String convertSWFToHTML(java.io.InputStream in)
          Arguments are: 0.
 java.lang.String convertSWFToHTML(java.net.URL in)
          Description of the Method
 int originalSize()
          Description of the Method
 SWFVectors tagDefineFont2(int id, int flags, java.lang.String name, int numGlyphs, int ascent, int descent, int leading, int[] codes, int[] advances, Rect[] bounds, int[] kernCodes1, int[] kernCodes2, int[] kernAdjustments)
          SWFTagTypes interface Save the character code info
 void tagDefineFontInfo(int fontId, java.lang.String fontName, int flags, int[] codes)
          SWFTagTypes interface Save the Text Font character code info
 SWFText tagDefineText(int id, Rect bounds, Matrix matrix)
          SWFTagTypes interface
 SWFText tagDefineText2(int id, Rect bounds, Matrix matrix)
          SWFTagTypes interface
 void tagDefineTextField(int fieldId, java.lang.String fieldName, java.lang.String initialText, Rect boundary, int flags, AlphaColor textColor, int alignment, int fontId, int fontSize, int charLimit, int leftMargin, int rightMargin, int indentation, int lineSpacing)
          SWFTagTypes interface Dump any initial text in the field
 
Methods inherited from class pt.tumba.parser.swf.SWFTagTypesImpl
header, tag, tagButtonCXForm, tagDefineBits, tagDefineBitsJPEG2, tagDefineBitsJPEG2, tagDefineBitsJPEG3, tagDefineBitsLossless, tagDefineBitsLossless2, tagDefineButton, tagDefineButton2, tagDefineButtonSound, tagDefineFont, tagDefineMorphShape, tagDefineQuickTimeMovie, tagDefineShape, tagDefineShape2, tagDefineShape3, tagDefineSound, tagDefineSprite, tagDoAction, tagEnableDebug, tagEnd, tagExport, tagFrameLabel, tagFreeCharacter, tagGenerator, tagGeneratorCommand, tagGeneratorFont, tagGeneratorText, tagImport, tagJPEGTables, tagNameCharacter, tagPlaceObject, tagPlaceObject2, tagProtect, tagRemoveObject, tagRemoveObject2, tagSerialNumber, tagSetBackgroundColor, tagShowFrame, tagSoundStreamBlock, tagSoundStreamHead, tagSoundStreamHead2, tagStartSound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sizeCount

private int sizeCount

fontCodes

protected java.util.Map fontCodes
Description of the Field


output

protected java.io.PrintWriter output
Description of the Field

Constructor Detail

SWF2HTML

public SWF2HTML()
Constructor for the SWF2HTML object

Method Detail

originalSize

public int originalSize()
Description of the Method

Specified by:
originalSize in interface DocFilter
Returns:
Description of the Return Value

tagDefineFontInfo

public void tagDefineFontInfo(int fontId,
                              java.lang.String fontName,
                              int flags,
                              int[] codes)
                       throws java.io.IOException
SWFTagTypes interface Save the Text Font character code info

Specified by:
tagDefineFontInfo in interface SWFTagTypes
Overrides:
tagDefineFontInfo in class SWFTagTypesImpl
Parameters:
fontId - Description of the Parameter
fontName - Description of the Parameter
flags - Description of the Parameter
codes - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineFont2

public SWFVectors tagDefineFont2(int id,
                                 int flags,
                                 java.lang.String name,
                                 int numGlyphs,
                                 int ascent,
                                 int descent,
                                 int leading,
                                 int[] codes,
                                 int[] advances,
                                 Rect[] bounds,
                                 int[] kernCodes1,
                                 int[] kernCodes2,
                                 int[] kernAdjustments)
                          throws java.io.IOException
SWFTagTypes interface Save the character code info

Specified by:
tagDefineFont2 in interface SWFTagTypes
Overrides:
tagDefineFont2 in class SWFTagTypesImpl
Parameters:
id - Description of the Parameter
flags - Description of the Parameter
name - Description of the Parameter
numGlyphs - Description of the Parameter
ascent - Description of the Parameter
descent - Description of the Parameter
leading - Description of the Parameter
codes - Description of the Parameter
advances - Description of the Parameter
bounds - Description of the Parameter
kernCodes1 - Description of the Parameter
kernCodes2 - Description of the Parameter
kernAdjustments - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineTextField

public void tagDefineTextField(int fieldId,
                               java.lang.String fieldName,
                               java.lang.String initialText,
                               Rect boundary,
                               int flags,
                               AlphaColor textColor,
                               int alignment,
                               int fontId,
                               int fontSize,
                               int charLimit,
                               int leftMargin,
                               int rightMargin,
                               int indentation,
                               int lineSpacing)
                        throws java.io.IOException
SWFTagTypes interface Dump any initial text in the field

Specified by:
tagDefineTextField in interface SWFTagTypes
Overrides:
tagDefineTextField in class SWFTagTypesImpl
Parameters:
fieldId - Description of the Parameter
fieldName - Description of the Parameter
initialText - Description of the Parameter
boundary - Description of the Parameter
flags - Description of the Parameter
textColor - Description of the Parameter
alignment - Description of the Parameter
fontId - Description of the Parameter
fontSize - Description of the Parameter
charLimit - Description of the Parameter
leftMargin - Description of the Parameter
rightMargin - Description of the Parameter
indentation - Description of the Parameter
lineSpacing - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

tagDefineText

public SWFText tagDefineText(int id,
                             Rect bounds,
                             Matrix matrix)
                      throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineText in interface SWFTagTypes
Overrides:
tagDefineText in class SWFTagTypesImpl
Parameters:
id - Description of the Parameter
bounds - Description of the Parameter
matrix - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

tagDefineText2

public SWFText tagDefineText2(int id,
                              Rect bounds,
                              Matrix matrix)
                       throws java.io.IOException
SWFTagTypes interface

Specified by:
tagDefineText2 in interface SWFTagTypes
Overrides:
tagDefineText2 in class SWFTagTypesImpl
Parameters:
id - Description of the Parameter
bounds - Description of the Parameter
matrix - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

convertSWFToHTML

public java.lang.String convertSWFToHTML(java.io.File in)
                                  throws java.lang.Exception
Description of the Method

Parameters:
in - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.lang.Exception - Description of the Exception

convertSWFToHTML

public java.lang.String convertSWFToHTML(java.net.URL in)
                                  throws java.lang.Exception
Description of the Method

Parameters:
in - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.lang.Exception - Description of the Exception

convertSWFToHTML

public java.lang.String convertSWFToHTML(java.io.InputStream in)
                                  throws java.lang.Exception
Arguments are: 0. Name of input SWF

Parameters:
in - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.lang.Exception - Description of the Exception

convertSWFToHTML

public java.lang.String convertSWFToHTML(byte[] b2)
                                  throws java.lang.Exception
Description of the Method

Parameters:
b2 - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.lang.Exception - Description of the Exception