C# 클래스 SwfDotNet.IO.SwfReader

The SwfReader class reads and parses a swf file from a stream.

The SwfReader creates a Swf object, that is a sequence of tags readed from a swf binary file. The tag sequences follows the Swf version 7 format specifications from Macromedia, and is compatible with Swf version 1 to 7.

The working process of the tags sequence is explain in the Macromedia specifications. The tags sequence is composed of objects from the SwfDotNet.IO.Tags namespace.

SwfReader gets all the content of a file and provides some functionnalities to decompile bitmap, sounds, video or scripting bytecode.

The tag reading process doesnt decompile actionscript bytecode, though. This is handled by SwfDotNet.IO.ByteCode.Decompiler. The action script tags contain directly actionscript bytecodes as a byte array. The SwfDotNet.IO.ByteCode.Decompiler object provides the way to get actionscript command as objects of the SwfDotNet.IO.ByteCode namespace.

파일 보기 프로젝트 열기: bladecoding/SwfExport 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Closes this stream reader.

ReadSwf ( ) : Swf

Read swf (header and tags), this is the only public method of SwfReader with Close and ReadSwfHeader methods. The returned Swf object contains swf headers informations and the tags list.

ReadSwfHeader ( ) : SwfHeader

Reads the SWF header only. This method don't read the complete content of the SWF file. Then, it provides the possibility to get faster header informations, and only it.

SwfReader ( Stream stream ) : System

Swf Reader class, takes an input stream as single argument.

SwfReader ( string path ) : System

Creates a new SwfReader instance.

SwfReader ( string path, bool useBuffer ) : System

Creates a new SwfReader instance. If useBuffer is true, all the content of the SWF file is readed first and is parsed from the memory after. If useBuffer is false, the SWF is parsed directly from the file stream. Use a buffer is faster to parse, but use more memory.

비공개 메소드들

메소드 설명
Inflate ( ) : void

Inflate compressed swf

Init ( string path, bool useBuffer ) : void

Inits the stream reading process.

ReadTag ( byte version, BufferedBinaryReader binaryReader, BaseTagCollection tagList ) : BaseTag

Read next tag from swf input stream.

ReadVideoFrameTag ( BufferedBinaryReader binaryReader, BaseTagCollection tagList ) : VideoFrameTag

Read and parse VideoFrameTag, into inner tags and raw byte-array header data

메소드 상세

Close() 공개 메소드

Closes this stream reader.
public Close ( ) : void
리턴 void

ReadSwf() 공개 메소드

Read swf (header and tags), this is the only public method of SwfReader with Close and ReadSwfHeader methods. The returned Swf object contains swf headers informations and the tags list.
public ReadSwf ( ) : Swf
리턴 Swf

ReadSwfHeader() 공개 메소드

Reads the SWF header only. This method don't read the complete content of the SWF file. Then, it provides the possibility to get faster header informations, and only it.
public ReadSwfHeader ( ) : SwfHeader
리턴 SwfHeader

SwfReader() 공개 메소드

Swf Reader class, takes an input stream as single argument.
public SwfReader ( Stream stream ) : System
stream Stream Stream to read swf from, must allow random access
리턴 System

SwfReader() 공개 메소드

Creates a new SwfReader instance.
public SwfReader ( string path ) : System
path string Path.
리턴 System

SwfReader() 공개 메소드

Creates a new SwfReader instance. If useBuffer is true, all the content of the SWF file is readed first and is parsed from the memory after. If useBuffer is false, the SWF is parsed directly from the file stream. Use a buffer is faster to parse, but use more memory.
public SwfReader ( string path, bool useBuffer ) : System
path string String path of the local swf file
useBuffer bool Use buffer.
리턴 System