Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.UINT8


* Parses ActionScript 3 'ifngt' instructions.
*/
public final class AS3IfngtParser {

  public static AS3Ifngt parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {
    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");
    final INT24 offset = parseINT24(parser, 0x00006, fieldName + "::offset");

    return new AS3Ifngt(opcode, offset);
  }
View Full Code Here


   *
   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static Pix24 parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final UINT8 pix24Reserved = parseUINT8(parser, 0x00006, fieldName + "::Pix24Reserved");
    final UINT8 pix24Red = parseUINT8(parser, 0x00006, fieldName + "::Pix24Red");
    final UINT8 pix24Green = parseUINT8(parser, 0x00006, fieldName + "::Pix24Green");
    final UINT8 pix24Blue = parseUINT8(parser, 0x00006, fieldName + "::Pix24Blue");

    return new Pix24(pix24Reserved, pix24Red, pix24Green, pix24Blue);
  }
View Full Code Here

* Parses ActionScript 3 'returnvalue' instructions.
*/
public final class AS3ReturnvalueParser {

  public static AS3Returnvalue parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {
    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");

    return new AS3Returnvalue(opcode);
  }
View Full Code Here

    final ClipEventFlags eventFlags = ClipEventFlagsParser.parse(parser, version, fieldName);
    final UINT32 actionRecordSize = parseUINT32(parser, 0x00006, fieldName + "::ActionRecordSize");

    // ClipEventKeyPress is null for version <= 5
    final UINT8 keyCode = eventFlags.getClipEventKeyPress() == null ? null : parseUINT8If(parser, 0x00006, eventFlags.getClipEventKeyPress(), fieldName + "::ClipActionsEndFlag");
    final List<Action> actions = ActionRecordParser.parse(parser, actionRecordSize.value(), fieldName + "::Actions");

    return new ClipActionRecord(eventFlags, actionRecordSize, keyCode, new ActionList(actions));
  }
View Full Code Here

* Parses ActionScript 3 'debugfile' instructions.
*/
public final class AS3DebugfileParser {

  public static AS3Debugfile parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {
    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");
    final EncodedU30 index = EncodedU30Parser.parse(parser, fieldName + "::index");

    return new AS3Debugfile(opcode, index);
  }
View Full Code Here

public class ActionWaitForFrameParser {

  public static ActionWaitForFrame parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {
    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final UINT16 frame = parseUINT16(parser, 0x00006, fieldName + "::Frame");
    final UINT8 skipCount = parseUINT8(parser, 0x00006, fieldName + "::SkipCount");

    return new ActionWaitForFrame(actionCode, length, frame, skipCount);
  }
View Full Code Here

*/
public final class AS3UnknownInstructionParser {

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

    final UINT8 opcode = parseUINT8(parser, 0x00006, fieldName + "::opcode");

    return new AS3UnknownInstruction(opcode);
  }
View Full Code Here

    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");
View Full Code Here

   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  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");
    final Flag fontFlagsBold = parseFlag(parser, 0x00006, "DefineFontInfo2::FontFlagsBold");
    final Flag fontFlagsWideCodes = parseFlag(parser, 0x00006, "DefineFontInfo2::FontFlagsWideCodes");
    final UINT8 languageCode = parseUINT8(parser, 0x00006, "DefineFont2::LanguageCode");

    final int remainingBytes = header.getNormalizedLength() - 2 - 1 - fontNameLen.value() - 1;

    final int numberOfGlyphs = remainingBytes / (fontFlagsWideCodes.value() ? 2 : 1);

View Full Code Here

      characters.add(ButtonRecordParser.parse(parser, String.format("DefineButton::Characters[%d]", characters.size())));

    } while (true);

    final UINT8 characterEndFlag = parseUINT8(parser, 0x00006, "DefineButton::CharacterEndFlag");

    final int actionRecordSize = parser.getBytePosition() - header.getBitPosition() / 8 + header.getNormalizedLength() - 1;

    final List<Action> actions = ActionRecordParser.parse(parser, actionRecordSize, "DefineButton::Actions");

    final UINT8 actionEndFlag = parseUINT8(parser, 0x00006, "DefineButton::ActionEndFlag");

    return new DefineButtonTag(header, buttonId, new ButtonRecordList(characters), characterEndFlag, new ActionList(actions), actionEndFlag);
  }
View Full Code Here

TOP

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

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.