Packageorg.apache.flex.utils
Classpublic class BinaryData
InheritanceBinaryData Inheritance Object

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The BinaryData class is a class that represents binary data. The way browsers handle binary data varies. This class abstracts those differences..



Public Properties
 PropertyDefined By
  bytesAvailable : int
[read-only] The total number of bytes remaining to be read.
BinaryData
  data : Object
[read-only] Get the platform-specific data for sending.
BinaryData
  length : int
[read-only] The total number of bytes of data.
BinaryData
  position : int
The total number of bytes remaining to be read.
BinaryData
Public Methods
 MethodDefined By
  
Constructor.
BinaryData
  
growBuffer(extra:int):void
A method to extend the size of the binary data so you can write more bytes to it.
BinaryData
  
readByte():int
Read a byte of binary data at the current position
BinaryData
  
readInt():int
Read a signed int of binary data at the current position
BinaryData
  
readShort():int
Read a short int of binary data at the current position
BinaryData
  
Read an unsigned int of binary data at the current position
BinaryData
  
writeByte(byte:int):void
Write a byte of binary data at the current position
BinaryData
  
writeInt(integer:uint):void
Write a signed int of binary data at the current position
BinaryData
  
writeShort(short:int):void
Write a short integer of binary data at the current position
BinaryData
  
writeUnsignedInt(unsigned:uint):void
Write an unsigned int of binary data at the current position
BinaryData
Property Detail
bytesAvailableproperty
bytesAvailable:int  [read-only]

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The total number of bytes remaining to be read.


Implementation
    public function get bytesAvailable():int
dataproperty 
data:Object  [read-only]

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Get the platform-specific data for sending. Generally only used by the network services.


Implementation
    public function get data():Object
lengthproperty 
length:int  [read-only]

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The total number of bytes of data.


Implementation
    public function get length():int
positionproperty 
position:int

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The total number of bytes remaining to be read.


Implementation
    public function get position():int
    public function set position(value:int):void
Constructor Detail
BinaryData()Constructor
public function BinaryData()

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Constructor.

Method Detail
growBuffer()method
public function growBuffer(extra:int):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

A method to extend the size of the binary data so you can write more bytes to it. Not all browsers have a way to auto-resize a binary data as you write data to the binary data buffer and resizing in large chunks in generally more efficient anyway.

Parameters

extra:int — The number of additional bytes.

readByte()method 
public function readByte():int

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Read a byte of binary data at the current position

Returns
int
readInt()method 
public function readInt():int

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Read a signed int of binary data at the current position

Returns
int
readShort()method 
public function readShort():int

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Read a short int of binary data at the current position

Returns
int
readUnsignedInt()method 
public function readUnsignedInt():uint

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Read an unsigned int of binary data at the current position

Returns
uint
writeByte()method 
public function writeByte(byte:int):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Write a byte of binary data at the current position

Parameters

byte:int

writeInt()method 
public function writeInt(integer:uint):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Write a signed int of binary data at the current position

Parameters

integer:uint

writeShort()method 
public function writeShort(short:int):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Write a short integer of binary data at the current position

Parameters

short:int

writeUnsignedInt()method 
public function writeUnsignedInt(unsigned:uint):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Write an unsigned int of binary data at the current position

Parameters

unsigned:uint