Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.AsciiString


public class StringInfoParser {

  public static StringInfo parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final EncodedU30 size = EncodedU30Parser.parse(parser, fieldName + "::size");
    final AsciiString name = parseString(parser, (int) size.value(), 0x00006, fieldName + "::utf8");

    return new StringInfo(size, name);
  }
View Full Code Here


   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static MetadataTag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final AsciiString metadata = parseString(parser, 0x00006, "Metadata::Metadata");

    return new MetadataTag(header, metadata);
  }
View Full Code Here

   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static EnableDebugger2Tag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 reserved = parseUINT16(parser, 0x00006, "EnableDebugger2::Reserved");
    final AsciiString password = parseString(parser, 0x00006, "EnableDebugger2::Reserved");

    return new EnableDebugger2Tag(header, reserved, password);
  }
View Full Code Here

    final Flag border = parseFlag(parser, 0x00006, "DefineEditText::Border");
    final Flag wasStatic = parseFlag(parser, 0x00006, "DefineEditText::WasStatic");
    final Flag html = parseFlag(parser, 0x00006, "DefineEditText::HTML");
    final Flag useOutlines = parseFlag(parser, 0x00006, "DefineEditText::UseOutlines");
    final UINT16 fontID = parseUINT16If(parser, 0x00006, hasFont, "DefineEditText::FontID");
    final AsciiString fontClass = parseStringIf(parser, 0x00006, hasFontClass, "DefineEditText::FontClass");
    final UINT16 fontHeight = parseUINT16If(parser, 0x00006, hasFont, "DefineEditText::FontHeight");
    final RGBA textColor = RGBAParser.parseIf(parser, hasTextColor, "DefineEditText::TextColor");
    final UINT16 maxLength = parseUINT16If(parser, 0x00006, hasMaxLength, "DefineEditText::MaxLength");
    final UINT8 align = parseUINT8If(parser, 0x00006, hasLayout, "DefineEditText::Align");
    final UINT16 leftMargin = parseUINT16If(parser, 0x00006, hasLayout, "DefineEditText::LeftMargin");
    final UINT16 rightMargin = parseUINT16If(parser, 0x00006, hasLayout, "DefineEditText::RightMargin");
    final UINT16 indent = parseUINT16If(parser, 0x00006, hasLayout, "DefineEditText::Indent");
    final INT16 leading = parseINT16If(parser, 0x00006, hasLayout, "DefineEditText::Leading");
    final AsciiString variableName = parseString(parser, 0x00006, "DefineEditText::VariableName");
    final AsciiString initialText = parseStringIf(parser, 0x00006, hasText, "DefineEditText::InitialText");

    return new DefineEditTextTag(header, characterId, bounds, hasText, wordWrap,
        multiline, password, readOnly, hasTextColor, hasMaxLength, hasFont,
        hasFontClass, autoSize, hasLayout, noSelect, border, wasStatic, html,
        useOutlines, fontID, fontClass, fontHeight, textColor, maxLength, align,
View Full Code Here

   */
  public static DefineFontInfo2Tag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 fontId = parseUINT16(parser, 0x00006, "DefineFontInfo2::FontId");
    final UINT8 fontNameLen = parseUINT8(parser, 0x00006, "DefineFontInfo2::FontNameLen");
    final AsciiString fontName = parseString(parser, fontNameLen.value(), 0x00006, "DefineFontInfo2::FontName");
    final UBits fontFlagsReserved = parseUBits(parser, 2, 0x00006, "DefineFontInfo2::FontFlagsReserved");
    final Flag fontFlagsSmallText = parseFlag(parser, 0x00006, "DefineFontInfo2::FontFlagsSmallText");
    final Flag fontFlagsShiftJIS = parseFlag(parser, 0x00006, "DefineFontInfo2::FontFlagsShiftJIS");
    final Flag fontFlagsANSI = parseFlag(parser, 0x00006, "DefineFontInfo2::FontFlagsANSI");
    final Flag fontFlagsItalic = parseFlag(parser, 0x00006, "DefineFontInfo2::FontFlagsItalic");
View Full Code Here

    final Flag placeFlagHasClassName = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasClassName");
    final Flag placeFlagHasCacheAsBitmap = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasCacheAsBitmap");
    final Flag placeFlagHasBlendMode = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasBlendMode");
    final Flag placeFlagHasFilterList = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasFilterList");
    final UINT16 depth = parseUINT16(parser, 0x00005, "PlaceObject3::Depth");
    final AsciiString className = parseStringIf(parser, 0x00006, placeFlagHasClassName.value() || (placeFlagHasImage.value() && placeFlagHasCharacter.value()), "PlaceObject3::ClassName");
    final UINT16 characterId = parseUINT16If(parser, 0x00006, placeFlagHasCharacter, "PlaceObject3::CharacterId");
    final Matrix matrix = MatrixParser.parseIf(parser, placeFlagHasMatrix, "PlaceObject3::Matrix");
    final CxFormWithAlpha colorTransform = CxFormWithAlphaParser.parseIf(parser, placeFlagHasColorTransform, "PlaceObject3::CxFormWithAlpha");
    final UINT16 ratio = parseUINT16If(parser, 0x00006, placeFlagHasRatio, "PlaceObject3::Ratio");
    final AsciiString name = parseStringIf(parser, 0x00006, placeFlagHasName, "PlaceObject3::Name");
    final UINT16 clipDepth = parseUINT16If(parser, 0x00006, placeFlagHasClipDepth, "PlaceObject3::ClipDepth");
    final FilterList surfaceFilterList = FilterListParser.parseIf(parser, placeFlagHasFilterList, "PlaceObject3::SurfaceFilterList");
    final UINT8 blendMode = parseUINT8If(parser, 0x00006, placeFlagHasBlendMode, "PlaceObject3::BlendMode");
    final UINT8 bitmapCache = parseUINT8If(parser, 0x00006, placeFlagHasCacheAsBitmap, "PlaceObject3::BitmapCache");
    final ClipActions clipActions = parseIf(parser, version, placeFlagHasClipActions, "PlaceObject3::ClipActions");
View Full Code Here

   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static StartSound2Tag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final AsciiString soundClassName = parseString(parser, 0x00006, "StartSound2::SoundClassName");
    final SoundInfo soundInfo = SoundInfoParser.parse(parser, "StartSound2::SoundInfo");

    return new StartSound2Tag(header, soundClassName, soundInfo);
  }
View Full Code Here

   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static DefineFontNameTag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 fontId = parseUINT16(parser, 0x00006, "DefineFontName::FontId");
    final AsciiString fontName = parseString(parser, 0x00006, "DefineFontName::FontName");
    final AsciiString fontCopyright = parseString(parser, 0x00006, "DefineFontName::FontCopyright");

    return new DefineFontNameTag(header, fontId, fontName, fontCopyright);
  }
View Full Code Here

   *
   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static ImportAssets2Tag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final AsciiString url = parseString(parser, 0x00006, "ImportAssets2::URL");
    final UINT8 reserved = parseUINT8(parser, 0x00006, "ImportAssets2::Reserved");
    final UINT8 reserved2 = parseUINT8(parser, 0x00006, "ImportAssets2::Reserved2");
    final UINT16 count = parseUINT16(parser, 0x00006, "ImportAssets2::Count");

    final List<Symbol> symbols = new ArrayList<Symbol>();
View Full Code Here

    final Flag fontFlagsWideCodes = parseFlag(parser, 0x00006, "DefineFont3::FontFlagsWideCodes");
    final Flag fontFlagsItalic = parseFlag(parser, 0x00006, "DefineFont3::FontFlagsItalic");
    final Flag fontFlagsBold = parseFlag(parser, 0x00006, "DefineFont3::FontFlagsBold");
    final UINT8 languageCode = parseUINT8(parser, 0x00006, "DefineFont3::LanguageCode");
    final UINT8 fontNameLen = parseUINT8(parser, 0x00006, "DefineFont3::FontNameLen");
    final AsciiString fontName = parseString(parser, fontNameLen.value(), 0x00006, "DefineFont3::FontName");
    final UINT16 numGlyphs = parseUINT16(parser, 0x00006, "DefineFont3::NumGlyphs");

    final List<IParsedINTElement> offsetTable = new ArrayList<IParsedINTElement>();

    for (int i=0;i<numGlyphs.value();i++) {
View Full Code Here

TOP

Related Classes of tv.porst.splib.binaryparser.AsciiString

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.