org.jlab.coda.jevio
Class CompositeData.Data

java.lang.Object
  extended by org.jlab.coda.jevio.CompositeData.Data
Enclosing class:
CompositeData

public static class CompositeData.Data
extends java.lang.Object

This class is used to provide all data when constructing a CompositeData object. Doing things this way keeps all internal data members self-consistent.


Constructor Summary
CompositeData.Data()
          Constructor.
 
Method Summary
 void addChar(byte b)
          Add an 8 bit byte (char) to the data.
 void addChar(byte[] b)
          Add an array of 8 bit bytes (chars) to the data.
 void addDouble(double d)
          Add a 64 bit double to the data.
 void addDouble(double[] d)
          Add an array of 64 bit doubles to the data.
 void addFloat(float f)
          Add a 32 bit float to the data.
 void addFloat(float[] f)
          Add an array of 32 bit floats to the data.
 void addInt(int i)
          Add a signed 32 bit integer to the data.
 void addInt(int[] i)
          Add an array of signed 32 bit integers to the data.
 void addLong(long l)
          Add a 64 bit long to the data.
 void addLong(long[] l)
          Add an array of 64 bit longs to the data.
 void addN(int N)
          This method adds an "N" or multiplier value to the data.
 void addShort(short s)
          Add a 16 bit short to the data.
 void addShort(short[] s)
          Add an array of 16 bit shorts to the data.
 void addString(java.lang.String s)
          Add a string to the data.
 void addString(java.lang.String[] s)
          Add an array of strings to the data.
 void addUchar(byte b)
          Add an unsigned 8 bit byte (uchar) to the data.
 void addUchar(byte[] b)
          Add an array of unsigned 8 bit bytes (uchars) to the data.
 void addUint(int i)
          Add an unsigned 32 bit integer to the data.
 void addUint(int[] i)
          Add an array of unsigned 32 bit integers to the data.
 void addUlong(long l)
          Add an unsigned 64 bit long to the data.
 void addUlong(long[] l)
          Add an array of unsigned 64 bit longs to the data.
 void addUshort(short s)
          Add an unsigned 16 bit short to the data.
 void addUshort(short[] s)
          Add an array of unsigned 16 bit shorts to the data.
 int getDataSize()
          This method gets the raw data size in bytes.
 int getPadding()
          This method gets the padding (in bytes).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeData.Data

public CompositeData.Data()
Constructor.

Method Detail

getDataSize

public int getDataSize()
This method gets the raw data size in bytes.

Returns:
raw data size in bytes.

getPadding

public int getPadding()
This method gets the padding (in bytes).

Returns:
padding (in bytes).

addN

public void addN(int N)
This method adds an "N" or multiplier value to the data. It needs to be added in sequence with other data.

Parameters:
N - N or multiplier value

addInt

public void addInt(int i)
Add a signed 32 bit integer to the data.

Parameters:
i - integer to add.

addInt

public void addInt(int[] i)
Add an array of signed 32 bit integers to the data.

Parameters:
i - array of integers to add.

addUint

public void addUint(int i)
Add an unsigned 32 bit integer to the data. In Java, there is no unsigned types. It is the responsibility of the user to handle this type properly.

Parameters:
i - unsigned integer to add.

addUint

public void addUint(int[] i)
Add an array of unsigned 32 bit integers to the data. In Java, there is no unsigned types. It is the responsibility of the user to handle this type properly.

Parameters:
i - array of unsigned integers to add.

addShort

public void addShort(short s)
Add a 16 bit short to the data.

Parameters:
s - short to add.

addShort

public void addShort(short[] s)
Add an array of 16 bit shorts to the data.

Parameters:
s - array of shorts to add.

addUshort

public void addUshort(short s)
Add an unsigned 16 bit short to the data.

Parameters:
s - unsigned short to add.

addUshort

public void addUshort(short[] s)
Add an array of unsigned 16 bit shorts to the data.

Parameters:
s - array of unsigned shorts to add.

addLong

public void addLong(long l)
Add a 64 bit long to the data.

Parameters:
l - long to add.

addLong

public void addLong(long[] l)
Add an array of 64 bit longs to the data.

Parameters:
l - array of longs to add.

addUlong

public void addUlong(long l)
Add an unsigned 64 bit long to the data.

Parameters:
l - unsigned long to add.

addUlong

public void addUlong(long[] l)
Add an array of unsigned 64 bit longs to the data.

Parameters:
l - array of unsigned longs to add.

addChar

public void addChar(byte b)
Add an 8 bit byte (char) to the data.

Parameters:
b - byte to add.

addChar

public void addChar(byte[] b)
Add an array of 8 bit bytes (chars) to the data.

Parameters:
b - array of bytes to add.

addUchar

public void addUchar(byte b)
Add an unsigned 8 bit byte (uchar) to the data.

Parameters:
b - unsigned byte to add.

addUchar

public void addUchar(byte[] b)
Add an array of unsigned 8 bit bytes (uchars) to the data.

Parameters:
b - array of unsigned bytes to add.

addFloat

public void addFloat(float f)
Add a 32 bit float to the data.

Parameters:
f - float to add.

addFloat

public void addFloat(float[] f)
Add an array of 32 bit floats to the data.

Parameters:
f - array of floats to add.

addDouble

public void addDouble(double d)
Add a 64 bit double to the data.

Parameters:
d - double to add.

addDouble

public void addDouble(double[] d)
Add an array of 64 bit doubles to the data.

Parameters:
d - array of doubles to add.

addString

public void addString(java.lang.String s)
Add a string to the data.

Parameters:
s - string to add.

addString

public void addString(java.lang.String[] s)
Add an array of strings to the data.

Parameters:
s - array of strings to add.