public class RobustMovieDecoder extends Object implements com.flagstone.transform.coder.SWFFactory<com.flagstone.transform.MovieTag>
Modifier and Type | Field and Description |
---|---|
static int |
DECODE_RULE
Decoding robustness/sloppiness factor.
|
static int |
DECODE_RULE_LAX
Allow arbitrary trailing values in decoded tags - attempt anything.
|
static int |
DECODE_RULE_NULLS
Allow trailing NULL values in decoded tags.
|
static int |
DECODE_RULE_STRICT
Allow no unparsed data - very strict decoding.
|
Constructor and Description |
---|
RobustMovieDecoder() |
Modifier and Type | Method and Description |
---|---|
void |
getObject(List<com.flagstone.transform.MovieTag> list,
com.flagstone.transform.coder.SWFDecoder coder,
com.flagstone.transform.coder.Context context) |
void |
setDecodeRule(int decodeRule) |
void |
setDelegate(com.flagstone.transform.coder.SWFFactory<com.flagstone.transform.MovieTag> delegate) |
public static final int DECODE_RULE
public static final int DECODE_RULE_STRICT
public static final int DECODE_RULE_NULLS
public static final int DECODE_RULE_LAX
public void setDecodeRule(int decodeRule)
decodeRule
- the robustness level to use for re-aligning the
decoder. MovieDecoder just chokes if a given tag has trailing data - does
not need as many bytes as it declares it has. This decorator will attempt
to realign by either:
1) LAX - chewing up *any* bytes to realign
2) NULLS - chewing up only trailing NULL bytes trailing the tag
3) STRICT - throw exception if an realignment is required.public void setDelegate(com.flagstone.transform.coder.SWFFactory<com.flagstone.transform.MovieTag> delegate)
delegate
- the underlying/wrapped MovieDecoder which does the heavy
lifting to parse out tags.public void getObject(List<com.flagstone.transform.MovieTag> list, com.flagstone.transform.coder.SWFDecoder coder, com.flagstone.transform.coder.Context context) throws IOException
getObject
in interface com.flagstone.transform.coder.SWFFactory<com.flagstone.transform.MovieTag>
IOException
Copyright © 2005–2015 IIPC. All rights reserved.