Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.UINT32


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

    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


    final UINT16 soundId = parseUINT16(parser, 0x00006, "DefineSound::SoundId");
    final UBits soundFormat = parseUBits(parser, 4, 0x00006, "DefineSound::SoundFormat");
    final UBits soundRate = parseUBits(parser, 2, 0x00006, "DefineSound::SoundRate");
    final UBits soundSize = parseUBits(parser, 1, 0x00006, "DefineSound::SoundSize");
    final UBits soundType = parseUBits(parser, 1, 0x00006, "DefineSound::SoundType");
    final UINT32 soundSampleCount = parseUINT32(parser, 0x00006, "DefineSound::SoundSampleCount");

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

    final ByteArray soundData = parseByteArray(parser, remainingBytes, 0x00006, "DefineSound::SoundData");
View Full Code Here

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

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineBitsJPEG3::CharacterId");
    final UINT32 alphaDataOffset = parseUINT32(parser, 0x00006, "DefineBitsJPEG3::AlphaDataOffset");
    final ByteArray imageData = parseByteArray(parser, alphaDataOffset.value(), 0x00006, "DefineBitsJPEG3::ImageData");
    final ByteArray bitmapAlphaData = parseByteArray(parser, header.getNormalizedLength() - alphaDataOffset.value() - 4 - 2, 0x00006, "DefineBitsJPEG3::BitmapAlphaData");

    return new DefineBitsJPEG3Tag(header, characterId, alphaDataOffset, imageData, bitmapAlphaData);
  }
View Full Code Here

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

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineBitsJPEG4::CharacterId");
    final UINT32 alphaDataOffset = parseUINT32(parser, 0x00006, "DefineBitsJPEG4::AlphaDataOffset");
    final UINT16 deblockParam = parseUINT16(parser, 0x00006, "DefineBitsLossless::DeblockParam");
    final ByteArray imageData = parseByteArray(parser, alphaDataOffset.value(), 0x00006, "DefineBitsJPEG4::ImageData");
    final ByteArray bitmapAlphaData = parseByteArray(parser, header.getNormalizedLength() - alphaDataOffset.value(), 0x00006, "DefineBitsJPEG4::BitmapAlphaData");

    return new DefineBitsJPEG4Tag(header, characterId, alphaDataOffset, deblockParam, imageData, bitmapAlphaData);
  }
View Full Code Here

    final Rect startEdgeBounds = RectParser.parse(parser, "DefineMorphShape2::StartEdgeBounds");
    final Rect endEdgeBounds = RectParser.parse(parser, "DefineMorphShape2::EndEdgeBounds");
    final UBits reserved = parseUBits(parser, 6, 0x00006, "DefineMorphShape::Reserved");
    final Flag useNonScalingStrokes = parseFlag(parser, 0x00006, "DefineMorphShape2::UseNonScalingStrokes");
    final Flag useScalingStrokes = parseFlag(parser, 0x00006, "DefineMorphShape2::UseScalingStrokes");
    final UINT32 offset = parseUINT32(parser, 0x00006, "DefineMorphShape2::Offset");
    final MorphFillStyleArray morphFillStyles = MorphFillStyleArrayParser.parse(parser, "DefineMorphShape::MorphFillStyleArray");
    final MorphLineStyleArray2 morphLineStyles = MorphLineStyleArray2Parser.parse(parser, "DefineMorphShape::MorphLineSyleArray");
    final Shape startEdges = ShapeParser.parse(parser, "DefineMorphShape2::StartEdges");
    final Shape endEdges = ShapeParser.parse(parser, "DefineMorphShape2::EndEdges");
View Full Code Here

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

    final UINT32 flags = parseUINT32(parser, 0x00006, "DoABC::Flags");
    final AsciiString name = parseString(parser, 0x00006, "DoABC::Name");

    final AS3Data abcData = AS3DataParser.parse(parser, "DoABC::ABCData");

    return new DoABCTag(header, flags, name, abcData);
View Full Code Here

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

    final UINT16 tag = parseUINT16(parser, 0x00006, "DefineBinaryData::Tag");
    final UINT32 reserved = parseUINT32(parser, 0x00006, "DefineBinaryData::Reserved");
    final ByteArray data = parseByteArray(parser, header.getNormalizedLength() - 2 - 4, 0x00006, "DefineBinaryData::Data");

    return new DefineBinaryDataTag(header, tag, reserved, data);
  }
View Full Code Here

  public static DefineMorphShapeTag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineMorphShape::CharacterId");
    final Rect startBounds = RectParser.parse(parser, "DefineMorphShape::StartBounds");
    final Rect endBounds = RectParser.parse(parser, "DefineMorphShape::EndBounds");
    final UINT32 offset = parseUINT32(parser, 0x00006, "DefineMorphShape::Offset");
    final MorphFillStyleArray morphFillStyles = MorphFillStyleArrayParser.parse(parser, "DefineMorphShape::MorphFillStyles");
    final MorphLineStyleArray morphLineStyles = MorphLineStyleArrayParser.parse(parser, "DefineMorphShape::MorphLineStyles");
    final Shape startEdges = ShapeParser.parse(parser, "DefineMorphShape::StartEdges");
    final Shape endEdges = ShapeParser.parse(parser, "DefineMorphShape::EndEdges");
View Full Code Here

import tv.porst.splib.binaryparser.UINT8;

public class PushedUnknown extends PushedValue<UINT32> {

  public PushedUnknown(final UINT8 type) {
    super(type, new UINT32(type.getBitPosition(), 0));
  }
View Full Code Here

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

    final UINT32 pos44 = parseUINT32(parser, 0x00006, fieldName + "::Pos44");
    final UINT16 leftLevel = parseUINT16(parser, 0x00006, fieldName + "LeftLevel");
    final UINT16 rightLevel = parseUINT16(parser, 0x00006, fieldName + "RightLevel");

    return new SoundEnvelope(pos44, leftLevel, rightLevel);
  }
View Full Code Here

TOP

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

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.