com.northgateis.reality.realsql
Class RealItemTokenizer
java.lang.Object
|
+--com.northgateis.reality.util.ItemView
|
+--com.northgateis.reality.realsql.RealItemTokenizer
- public class RealItemTokenizer
- extends com.northgateis.reality.util.ItemView
Wrapper object for a com.northgateis.util.ItemView object.
Fields inherited from class com.northgateis.reality.util.ItemView
|
AM,
SM,
SVM,
VM
|
Constructor Summary |
RealItemTokenizer(byte[] itm) Create a new item view with normal system
delimiters (AM, VM, SVM)
|
RealItemTokenizer(byte[] item,
byte del) Create a new item view with user defined
delimiter
|
RealItemTokenizer(byte[] itm,
byte del1,
byte del2,
byte del3) Create a new item view with user defined
delimiters
|
Method Summary |
int | getIndex(byte[] buf,
int start,
int len,
int num,
int delim) Find the n'th
occurrence of the delimiter in the byte array. |
java.lang.String | toString(byte[] buf,
int start,
int len) Convert the byte array to a character string. |
java.lang.String | toString(byte[] buf,
int start,
int len,
boolean delim) Convert the byte array to a character string. |
Methods inherited from class com.northgateis.reality.util.ItemView |
copy,
copy,
copy,
get,
get,
get,
getAll,
getLength,
main,
numAttributes,
numSubValues,
numValues,
trace |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
RealItemTokenizer
public RealItemTokenizer(byte[] itm)
- Create a new item view with normal system delimiters (AM, VM, SVM)
- Parameters:
item
- byte array holding the reality item to be viewed
RealItemTokenizer
public RealItemTokenizer(byte[] item,
byte del)
- Create a new item view with user defined delimiter
- Parameters:
item
- byte array holding the reality item to be vieweddel
- byte containing first level delimiter
RealItemTokenizer
public RealItemTokenizer(byte[] itm,
byte del1,
byte del2,
byte del3)
- Create a new item view with user defined delimiters
- Parameters:
item
- byte array holding the reality item to be vieweddel1
- byte containing first level delimiterdel2
- byte containing second level delimiterdel3
- byte containing third level delimiter
toString
public java.lang.String toString(byte[] buf,
int start,
int len,
boolean delim)
- Convert the byte array to a character string.
- Parameters:
buf
- byte array to be converted.start
- starting offset into byte array for conversion.len
- number of bytes to convert.delim
- true if conversion should terminate on meeting a Reality system delimiter (SVM | VM | AM | SM).- Returns:
- converted string.
toString
public java.lang.String toString(byte[] buf,
int start,
int len)
- Convert the byte array to a character string.
- Parameters:
buf
- byte array to be converted.start
- starting offset into byte array for conversion.len
- number of bytes to convert.- Returns:
- converted string.
getIndex
public int getIndex(byte[] buf,
int start,
int len,
int num,
int delim)
- Find the n'th occurrence of the delimiter in the byte array.
- Parameters:
buf
- byte array to be converted.start
- starting offset into byte array for conversion.len
- number of bytes to scan.num
- number of delimiters to skip.delim
- true if conversion should terminate on meeting a Reality system delimiter (SVM | VM | AM | SM).- Returns:
- index to delimiter if found; else -1.