All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.util.QTByteObject

java.lang.Object
   |
   +----quicktime.util.QTByteObject

public class QTByteObject
extends Object
implements PrimitivesLib, Serializable
Provides a representation of the native data structure as a byte array. The class implements the Serializable interface and can thus be serialized.

However the byte[] member is marked as transient because typically a QTByteObject is used to contain objects that have fields, such as shorts, ints, that are larger than bytes. Moving these objects from big to little to big endian run-time architectures can cause problems if the endian issues of these members are not taken care of by the particular class of the object that is being serialized. Thus, any subclass of QTByteObject that is to be serialized defines custome read and write object methods that will ensure that the serialized data that is written out is in big endian format, and if required will be flipped back to native format when read in.


Method Index

 o equals(Object)
Returns true if the two objects have the same value.
 o fromArray(byte[])
This call will return a QTByteObject which becomes a proxy for the specified byte array.
 o getBytes()
Returns the byte array containing the packed native object.
 o getSize()
Returns the size of the represented native object.
 o toString()
Returns a string representation of this object

Methods

 o fromArray
 public static QTByteObject fromArray(byte ar[])
This call will return a QTByteObject which becomes a proxy for the specified byte array. It does not copy the byte array - but references it.

Parameters:
ar - the byte array to represent
Returns:
a QTByteObject with the specified array as its target bytes
 o getBytes
 public final byte[] getBytes()
Returns the byte array containing the packed native object.

Returns:
the actual byte array NOT a copy
 o getSize
 public int getSize()
Returns the size of the represented native object.

Returns:
size
 o equals
 public boolean equals(Object obj)
Returns true if the two objects have the same value.

Overrides:
equals in class Object
 o toString
 public String toString()
Returns a string representation of this object

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index