Examples of UBits


Examples of tv.porst.splib.binaryparser.UBits

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

    final UBits first6 = parser.peekBits(6);

    if (first6.value() == 0) {
      return EndShapeRecordParser.parse(parser, fieldName);
    }
    else if ((first6.value() & 0x30) == 0x30) {
      return StraightEdgeRecordParser.parse(parser, fieldName);
    }
    else if ((first6.value() & 0x20) == 0x20) {
      return CurvedEdgeRecordParser.parse(parser, fieldName);
    }
    else {
      return StyleChangeRecordParser.parse(parser, fillBits, lineBits, fieldName);
    }
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

public class ActionGetURL2Parser {

  public static ActionGetURL2 parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {
    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final UBits sendVarsMethod = parseUBits(parser, 2, 0x00006, fieldName + "::SendVarsMethod");
    final UBits reserved = parseUBits(parser, 4, 0x00006, fieldName + "::Reserved");
    final Flag loadTargetFlag = parseFlag(parser, 0x00006, fieldName + "::LoadTargetFlag");
    final Flag loadVariablesFlag = parseFlag(parser, 0x00006, fieldName + "::LoadVariablesFlag");

    return new ActionGetURL2(actionCode, length, sendVarsMethod, reserved, loadTargetFlag, loadVariablesFlag);
  }
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

public class ActionGotoFrame2Parser {

  public static ActionGotoFrame2 parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {
    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final UBits reserved = parseUBits(parser, 6, 0x00006, fieldName + "::Reserved");
    final Flag sceneBiasFlag = parseFlag(parser, 0x00006, fieldName + "::SceneBiasFlag");
    final Flag playFlag = parseFlag(parser, 0x00006, fieldName + "::PlayFlag");
    final UINT16 sceneBias = parseUINT16If(parser, 0x00006, sceneBiasFlag, fieldName + "::SceneBias");

    return new ActionGotoFrame2(actionCode, length, reserved, sceneBiasFlag, playFlag, sceneBias);
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

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

    final UBits buttonReserved = parseUBits(parser, 2, 0x00006, fieldName + "::ButtonReserved");
    final Flag buttonHasBlendMode = parseFlag(parser, 0x00006, fieldName + "::ButtonHasBlendMode");
    final Flag buttonHasFilterList = parseFlag(parser, 0x00006, fieldName + "::ButtonHasFilterList");
    final Flag buttonStateHitTest = parseFlag(parser, 0x00006, fieldName + "::ButtonStateHitTest");
    final Flag buttonStateDown = parseFlag(parser, 0x00006, fieldName + "::ButtonStateDown");
    final Flag buttonStateOver = parseFlag(parser, 0x00006, fieldName + "::ButtonStateOver");
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

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

    final UINT16 textId = parseUINT16(parser, 0x00006, "CSMTextSettings::TextId");
    final UBits useFlashType = parseUBits(parser, 2, 0x00006, "CSMTextSettings::UseFlashType");
    final UBits gridFit = parseUBits(parser, 3, 0x00006, "CSMTextSettings::GridFit");
    final UBits reserved = parseUBits(parser, 3, 0x00006, "CSMTextSettings::Reserved");
    final Float32 thickness = parseFloat(parser, 0x00006, "CSMTextSettings::Thickness");
    final Float32 sharpness = parseFloat(parser, 0x00006, "CSMTextSettings::Sharpness");
    final UINT8 reserved2 = parseUINT8(parser, 0x00006, "CSMTextSettings::Reserveds");

    return new CSMTextSettingsTag(header, textId, useFlashType, gridFit, reserved, thickness, sharpness, reserved2);
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

    final UINT16 characterId = parseUINT16(parser, 0x00006, "DefineVideoStream::CharacterId");
    final UINT16 numFrames = parseUINT16(parser, 0x00006, "DefineVideoStream::NumFrames");
    final UINT16 width = parseUINT16(parser, 0x00006, "DefineVideoStream::Width");
    final UINT16 height = parseUINT16(parser, 0x00006, "DefineVideoStream::Height");
    final UBits videoFlagsReserved = parseUBits(parser, 4, 0x00006, "DefineVideoStream::VideoFlagsReserved");
    final UBits videoFlagsDeblocking = parseUBits(parser, 3, 0x00006, "DefineVideoStream::VideoFlagsDeblocking");
    final Flag videoFlagsSmoothing = parseFlag(parser, 0x00006, "DefineVideoStream::VideoFlagsSmoothing");
    final UINT8 codecId = parseUINT8(parser, 0x00006, "DefineVideoStream::CodecID");

    return new DefineVideoStreamTag(header, characterId, numFrames, width, height,
        videoFlagsReserved, videoFlagsDeblocking, videoFlagsSmoothing,
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

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

    final UBits reserved = parseUBits(parser, 4, 0x00006, "SoundStreamHead2::Reserved");
    final UBits playbackSoundRate = parseUBits(parser, 2, 0x00006, "SoundStreamHead2::PlaybackSoundRate");
    final UBits playbackSoundSize = parseUBits(parser, 1, 0x00006, "SoundStreamHead2::PlaybackSoundSize");
    final UBits playbackSoundType = parseUBits(parser, 1, 0x00006, "SoundStreamHead2::PlaybackSoundType");
    final UBits streamSoundCompression = parseUBits(parser, 4, 0x00006, "SoundStreamHead2::StreamSoundCompression");
    final UBits streamSoundRate = parseUBits(parser, 2, 0x00006, "SoundStreamHead2::StreamSoundRate");
    final UBits streamSoundSize = parseUBits(parser, 1, 0x00006, "SoundStreamHead2::StreamSoundSize");
    final UBits streamSoundType = parseUBits(parser, 1, 0x00006, "SoundStreamHead2::StreamSoundSize");
    final UINT16 streamSoundSampleCount = parseUINT16(parser, 0x00006, "SoundStreamHead2::StreamSoundSampleCount");
    final INT16 latencySeek = parseINT16If(parser, 0x00006, streamSoundCompression.value() == 2, "SoundStreamHead2::LatencySeek");

    return new SoundStreamHead2Tag(header, reserved, playbackSoundRate,
        playbackSoundSize, playbackSoundType, streamSoundCompression,
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

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

    final UBits first6 = parser.peekBits(6);

    if (first6.value() == 0) {
      return EndShapeRecordParser.parse(parser, fieldName);
    }
    else if ((first6.value() & 0x30) == 0x30) {
      return StraightEdgeRecordParser.parse(parser, fieldName);
    }
    else if ((first6.value() & 0x20) == 0x20) {
      return CurvedEdgeRecordParser.parse(parser, fieldName);
    }
    else {
      return StyleChangeRecord3Parser.parse(parser, numFillBits, numLineBits, fieldName);
    }
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

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

    final UBits spreadMode = parseUBits(parser, 2, 0x00006, fieldName + "::SpreadMode");
    final UBits interpolationMode = parseUBits(parser, 2, 0x00006, fieldName + "::InterpolationMode");
    final UBits numGradients = parseUBits(parser, 4, 0x00006, fieldName + "::NumGradients");

    final List<GradRecord3> gradientRecords = new ArrayList<GradRecord3>();

    for (int i=0;i<numGradients.value();i++) {
      gradientRecords.add(GradRecord3Parser.parse(parser, String.format(fieldName + "::GradientRecords[%d]", i)));
    }

    return new Gradient3(spreadMode, interpolationMode, numGradients, new GradRecord3List(gradientRecords));
  }
View Full Code Here

Examples of tv.porst.splib.binaryparser.UBits

  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");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.