com.latencybusters.lbm.sdm
Class LBMSDMArrayUint32

java.lang.Object
  extended by com.latencybusters.lbm.sdm.LBMSDM
      extended by com.latencybusters.lbm.sdm.LBMSDMField
          extended by com.latencybusters.lbm.sdm.LBMSDMFieldUint32
              extended by com.latencybusters.lbm.sdm.LBMSDMArrayUint32
All Implemented Interfaces:
java.lang.Cloneable, java.util.Iterator

public class LBMSDMArrayUint32
extends LBMSDMFieldUint32
implements java.lang.Cloneable, java.util.Iterator

Implements an SDM Field that is an array of unsigned 32 bit integers.


Field Summary
 
Fields inherited from class com.latencybusters.lbm.sdm.LBMSDMFieldUint32
internalValue
 
Fields inherited from class com.latencybusters.lbm.sdm.LBMSDMField
elements, MAX_FIELD_NAME_LENGTH, name, type, TYPE_ARRAY_BLOB, TYPE_ARRAY_BOOLEAN, TYPE_ARRAY_DECIMAL, TYPE_ARRAY_DOUBLE, TYPE_ARRAY_FLOAT, TYPE_ARRAY_INT16, TYPE_ARRAY_INT32, TYPE_ARRAY_INT64, TYPE_ARRAY_INT8, TYPE_ARRAY_MESSAGE, TYPE_ARRAY_STRING, TYPE_ARRAY_TIMESTAMP, TYPE_ARRAY_UINT16, TYPE_ARRAY_UINT32, TYPE_ARRAY_UINT64, TYPE_ARRAY_UINT8, TYPE_ARRAY_UNICODE, TYPE_BLOB, TYPE_BOOLEAN, TYPE_DECIMAL, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT16, TYPE_INT32, TYPE_INT64, TYPE_INT8, TYPE_INVALID, TYPE_MESSAGE, TYPE_STRING, TYPE_TIMESTAMP, TYPE_UINT16, TYPE_UINT32, TYPE_UINT64, TYPE_UINT8, TYPE_UNICODE
 
Fields inherited from class com.latencybusters.lbm.sdm.LBMSDM
DEBUG_BASIC, debug_level, DEBUG_VERBOSE_PARSING
 
Constructor Summary
LBMSDMArrayUint32(java.lang.String name)
          Constructor for a new array field
LBMSDMArrayUint32(java.lang.String name, boolean nullfield)
          Constructor for a new array field
 
Method Summary
 void append(LBMSDMField newfield)
          Append a value to the end of the array
 void append(long v)
          Append a value to the end of the array
 LBMSDMArrayUint32 clone()
          Get a copy of this object
 int format(byte[] buf, int offset)
          Format the array in to a byte buffer
 int get_len()
          Get the length of formatted field
 long get()
          Get the current field for this array
 long get(int idx)
          Get the field for a specific array index
 boolean hasNext()
          Check to see if there is a next value
 int length()
          Get the length of this array
 java.lang.Long next()
          Get the next element in the array
 int parse(byte[] buf, int offset)
          Parse a byte buffer and store the value
 void remove()
          Remove the current element
 void remove(int element)
          Remove an array element
 void reset()
          Reset the current element to the first
 void set(LBMSDMField newfield, int arrayindex)
          Set the current element based on the array index
 void set(long v)
          Set the current element
 void set(long v, int idx)
          Set the current element based on the index
 java.lang.String toDbgString()
          Get a string useful for debugging
 java.lang.String toString()
          Get the string form of the array
 
Methods inherited from class com.latencybusters.lbm.sdm.LBMSDMFieldUint32
fixed_size, format, get_base_len
 
Methods inherited from class com.latencybusters.lbm.sdm.LBMSDMField
add_element, format_name, format_type, get_name, getType, getType, getTypeString, internalString, isNull, name_len, sameBaseType, sameType, set_name, setNull, type_len
 
Methods inherited from class com.latencybusters.lbm.sdm.LBMSDM
log, set_debug_level
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LBMSDMArrayUint32

public LBMSDMArrayUint32(java.lang.String name)
Constructor for a new array field

Parameters:
name - The name of the field

LBMSDMArrayUint32

public LBMSDMArrayUint32(java.lang.String name,
                         boolean nullfield)
Constructor for a new array field

Parameters:
name - The name of the field
nullfield - Boolean indicating if the field is a null field (true) or if its an array of 0 elements (non-null)
Method Detail

get

public long get()
Get the current field for this array

Overrides:
get in class LBMSDMFieldUint32
Returns:
The current field value

get

public long get(int idx)
         throws LBMSDMException
Get the field for a specific array index

Parameters:
idx - The array index
Returns:
The current field value
Throws:
LBMSDMOutOfRangeException - when idx exceeds the number of elements in the array
LBMSDMException

get_len

public int get_len()
Get the length of formatted field

Overrides:
get_len in class LBMSDMFieldUint32
Returns:
The number of bytes a formatted 32 bit unsigned integer will use

set

public void set(long v)
Set the current element

Overrides:
set in class LBMSDMFieldUint32
Parameters:
v - The value to be set

set

public void set(long v,
                int idx)
Set the current element based on the index

Parameters:
v - The value to be set
idx - The element of the array to be set

set

public void set(LBMSDMField newfield,
                int arrayindex)
         throws LBMSDMException
Set the current element based on the array index

Overrides:
set in class LBMSDMField
Parameters:
newfield - The new field
arrayindex - The array index in the field
Throws:
LBMSDMOutOfRangeException - when the array index exceeds the number of fields in the array
LBMSDMException

append

public void append(LBMSDMField newfield)
            throws LBMSDMException
Append a value to the end of the array

Overrides:
append in class LBMSDMField
Parameters:
newfield - The field value to be appended
Throws:
LBMSDMException - when a non array field tries to call append()

append

public void append(long v)
Append a value to the end of the array

Parameters:
v - The field value to be appended

toDbgString

public java.lang.String toDbgString()
Get a string useful for debugging

Overrides:
toDbgString in class LBMSDMFieldUint32
Returns:
A string representation of this object

format

public int format(byte[] buf,
                  int offset)
           throws LBMSDMException
Format the array in to a byte buffer

Overrides:
format in class LBMSDMFieldUint32
Parameters:
buf - The byte buffer to have the array formatted in
offset - The offset to begin formatting in the buffer
Returns:
The updated offset after formatting (points to an unused offset)
Throws:
LBMSDMInsufficientSpaceException - when the buffer doesn't have enough space
LBMSDMException - when an unexpected error occurs within LBMSDM

toString

public java.lang.String toString()
Get the string form of the array

Overrides:
toString in class LBMSDMFieldUint32
Returns:
A String in the form of the integer

parse

public int parse(byte[] buf,
                 int offset)
          throws LBMSDMException
Parse a byte buffer and store the value

Overrides:
parse in class LBMSDMFieldUint32
Parameters:
buf - The byte buffer to be parsed for the array
offset - The offset to begin parsing the buffer
Returns:
The next offset to be parsed
Throws:
LBMSDMCannotConvertException - if there is not enough data in the buffer
LBMSDMException - when an unexpected error occurs within LBMSDM

length

public int length()
Get the length of this array

Overrides:
length in class LBMSDMField
Returns:
The number of elements

clone

public LBMSDMArrayUint32 clone()
                        throws java.lang.CloneNotSupportedException
Get a copy of this object

Overrides:
clone in class LBMSDMFieldUint32
Returns:
A new object with a copy
Throws:
java.lang.CloneNotSupportedException

remove

public void remove()
Remove the current element

Specified by:
remove in interface java.util.Iterator

next

public java.lang.Long next()
Get the next element in the array

Specified by:
next in interface java.util.Iterator
Returns:
The next field value

hasNext

public boolean hasNext()
Check to see if there is a next value

Specified by:
hasNext in interface java.util.Iterator

reset

public void reset()
Reset the current element to the first


remove

public void remove(int element)
Remove an array element

Overrides:
remove in class LBMSDMField
Parameters:
element - The element index to be removed


All of the documentation and software included in this and any other Informatica Inc "Ultra Messaging" Release is Copyright (C) 2004-2014, Informatica Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with 29West Inc. Copyright © 2004-2014, Informatica, Inc. All Rights Reserved.