Java DTV API 1.3
18-Nov-2009

com.sun.dtv.filtering
Class DataSectionDataBuffer

java.lang.Object
  extended by com.sun.dtv.filtering.DataSectionDataBuffer

public class DataSectionDataBuffer
extends Object

This class encapsulates a portion of a Transport Stream Section payload.

See Also:
DataSection

Field Summary
protected  byte[] data
          The byte array that actually holds the media data chunk for this Buffer.
static int FLAG_IS_COPY
          Indicates that this data is a copy or clone and changing it will not affect the data it was generated from.
protected  int flags
          A flag mask that describes the boolean attributes enabled for this Buffer.
protected  int length
          States how many samples are valid in the array.
protected  int offset
          Points to the starting point (offset) into the array where the valid data begins.
 
Constructor Summary
DataSectionDataBuffer()
           
 
Method Summary
 Object clone()
          Clone a buffer.
 void copy(DataSectionDataBuffer buffer)
          Copy the attributes from the specified Buffer into this Buffer.
 void copy(DataSectionDataBuffer buffer, boolean swapData)
          Copy the attributes from the specified Buffer into this Buffer.
 byte[] getData()
          Gets the internal byte array for this Buffer.
 int getFlags()
          Gets the mask of the flags set for this Buffer.
 int getLength()
          Gets the length of the valid data in this Buffer.
 int getOffset()
          Gets the offset of the valid data in this Buffer.
 void setData(byte[] data)
          Sets the internal byte array for this Buffer.
 void setFlags(int flags)
          Sets the flag mask for this Buffer.
 void setLength(int length)
          Sets the length of the valid data in this Buffer.
 void setOffset(int offset)
          Sets the offset of the valid data in this Buffer.
 String toString()
          The String representation of the object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

flags

protected int flags
A flag mask that describes the boolean attributes enabled for this Buffer. This mask is set to the logical sum of all of the flags that are set.

See Also:
FLAG_IS_COPY

data

protected byte[] data
The byte array that actually holds the media data chunk for this Buffer.


length

protected int length
States how many samples are valid in the array. (The array itself might be larger than the length).


offset

protected int offset
Points to the starting point (offset) into the array where the valid data begins.


FLAG_IS_COPY

public static final int FLAG_IS_COPY
Indicates that this data is a copy or clone and changing it will not affect the data it was generated from.

See Also:
Constant Field Values
Constructor Detail

DataSectionDataBuffer

public DataSectionDataBuffer()
Method Detail

getFlags

public int getFlags()
Gets the mask of the flags set for this Buffer. The integer value of the mask is equal to the logical sum of the flags that are set.

Returns:
the currently active flags
See Also:
FLAG_IS_COPY, setFlags(int)

setFlags

public void setFlags(int flags)
Sets the flag mask for this Buffer. The integer value of the mask is equal to the logical sum of the flags that are set.

Parameters:
flags - The specific flags to be set for the buffer object
See Also:
FLAG_IS_COPY, getFlags()

getData

public byte[] getData()
Gets the internal byte array for this Buffer.

Returns:
The byte array for this Buffer.
See Also:
data, setData(byte[])

setData

public void setData(byte[] data)
Sets the internal byte array for this Buffer.

Parameters:
data - the byte array to be set
See Also:
data, getData()

getLength

public int getLength()
Gets the length of the valid data in this Buffer.

Returns:
The length of the valid data in the data byte array. for this Buffer.
See Also:
length, setLength(int)

setLength

public void setLength(int length)
Sets the length of the valid data in this Buffer.

Parameters:
length - The length of the valid data in the data byte array.
See Also:
length, getLength()

getOffset

public int getOffset()
Gets the offset of the valid data in this Buffer.

Returns:
The starting point of the valid data in the data byte array.
See Also:
offset, setOffset(int)

setOffset

public void setOffset(int offset)
Sets the offset of the valid data in this Buffer.

Parameters:
offset - The starting point of the valid data in the data byte array.
See Also:
offset, getOffset()

copy

public void copy(DataSectionDataBuffer buffer)
Copy the attributes from the specified Buffer into this Buffer.

Parameters:
buffer - The input Buffer the copy the attributes from.

copy

public void copy(DataSectionDataBuffer buffer,
                 boolean swapData)
Copy the attributes from the specified Buffer into this Buffer. If swapData is true, the data values are swapped between the buffers, otherwise the data value is copied.

Parameters:
buffer - The input Buffer the copy the attributes from.
swapData - Specifies whether the data objects are to be swapped.

clone

public Object clone()
Clone a buffer.

Overrides:
clone in class Object
Returns:
the cloned object

toString

public String toString()
The String representation of the object.

Overrides:
toString in class Object
Returns:
the string representation

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.