|
BinaryDocument.Content object
Prototype for BinaryDocument.Content objects SyntaxYou cannot create these objects, you can only get access to them inside an BinaryDocument.
var doc = current_frame.coordinator.document;
// with an activate binary view
Parametersnone. Property Ofnone. Implemented InECMerge 2.4 DescriptionBinaryDocument.Content let you access the content of a particular pane. Properties
MethodsNote that unlike TextDocument.Content, the toString() function is not provided. Binary files of arbitrary size can be handled of ECMerge and toString() needs to return a string fitting in memory. ExamplesExample 1.Obtaining the length of a content.
var doc = current_frame.coordinator.document;
// with an active binary frame
See Also
Method get_textSyntaxfunction get_text (selection)
Parametersselection. BinaryDocument.Selection object. Selection from which the text is requested Method OfBinaryDocument.Content object. Implemented InECMerge 2.4 DescriptionReturns the text covered by the selection. ExamplesExample 1.Retrieves the 100 th first bytes of the right side and logs them:
var doc =
current_frame.coordinator.document; // with an
active binary frame
See Also
Method read_numberSyntaxfunction read_number (offset, size, endianess, type)
Parametersoffset. Number. Position in the file (in bytes)
Method OfBinaryDocument.Content object. Implemented InECMerge 2.4 DescriptionReturns the numeric value of the number stored in given binary format. ECMerge can decode the following combinations. All of them are available in little and big endian.
This method main usage is to read files headers to determine offsets and sizes of ignorable dynamic fields. ExamplesExample 1.Retrieves an unsigned int coded in 4 bytes at offset 10 in little endian format then logs it to screen:
var doc =
current_frame.coordinator.document; // with an
active binary frame
See Also
|
|||||||||||||