ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
Endian

Package | flash.utils
Class | public final class Endian
Inheritance | Endian Object

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

The Endian class contains values that denote the byte order used to represent multibyte numbers. The byte order is either bigEndian (most significant byte first) or littleEndian (least significant byte first).

Flash Player can interface with a server by using the binary protocol of that server, directly. Some servers use the bigEndian byte order and some servers use the littleEndian byte order. Most servers on the Internet use the bigEndian byte order because "network byte order" is bigEndian. The littleEndian byte order is popular because the Intel x86 architecture uses it. Use the endian byte order that matches the protocol of the server that is sending or receiving data.

See also

flash.utils.ByteArray.endian
flash.utils.IDataInput.endian
flash.utils.IDataOutput.endian
flash.net.Socket.endian
flash.net.URLStream.endian

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined By
--- | --- | ---
|  | BIG_ENDIAN : String = "bigEndian" [static] Indicates the most significant byte of the multibyte number appears first in the sequence of bytes. | Endian
|  | LITTLE_ENDIAN : String = "littleEndian" [static] Indicates the least significant byte of the multibyte number appears first in the sequence of bytes. | Endian

Constant Detail

BIG_ENDIAN | Constant

`public static const BIG_ENDIAN:String = "bigEndian"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

Indicates the most significant byte of the multibyte number appears first in the sequence of bytes.

The hexadecimal number 0x12345678 has 4 bytes (2 hexadecimal digits per byte). The most significant byte is 0x12. The least significant byte is 0x78. (For the equivalent decimal number, 305419896, the most significant digit is 3, and the least significant digit is 6).

A stream using the bigEndian byte order (the most significant byte first) writes:

      12 34 56 78

See also

Socket connections

LITTLE_ENDIAN | Constant |

`public static const LITTLE_ENDIAN:String = "littleEndian"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

Indicates the least significant byte of the multibyte number appears first in the sequence of bytes.

The hexadecimal number 0x12345678 has 4 bytes (2 hexadecimal digits per byte). The most significant byte is 0x12. The least significant byte is 0x78. (For the equivalent decimal number, 305419896, the most significant digit is 3, and the least significant digit is 6).

A stream using the littleEndian byte order (the least significant byte first) writes:

      78 56 34 12

See also

Socket connections

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00