Package com.nt.udc.ndk.node
Interface StringIdStoreIfc
public interface StringIdStoreIfc
An interface implemented by StringIdNAR which is used for storing data
fields using string attribute ids. Data values stored into a StringIdNAR
using these methods can be looked up using the methods of
StringIdLookupIfc, also implemented by StringIdNAR.
-
Method Summary
Modifier and TypeMethodDescriptionvoidStores a null attrubute (with no data) at the specified id Stored type is NAR.NULL_TYPEvoidStores a given integer value at the specified id Stored type is NAR.BYTE_TYPEvoidStores a data field given as a byte array at the specified id Stored type is NAR.BYTE_ARRAY_TYPEvoidStores a given floating point value at the specified id Stored type is NAR.DOUBLE_TYPEvoidStores a given floating point value at the specified id Stored type is NAR.FLOAT_TYPEvoidStores a given integer value at the specified id Stored type is NAR.INT_TYPEvoidStores a given value of specified type with the specified id.voidStores a given integer value at the specified id Stored type is NAR.LONG_TYPEvoidStores a given integer value at the specified id Stored type is NAR.SHORT_TYPEvoidStores a String object at the specified id Stored type is NAR.STRING_TYPEvoidloadBigEndian(String attrId, int attrType, DataInputStream is) Stores a numeric primitive, e.g.voidloadByteArray(String attrId, InputStream is, int nbytes) Stores a given number of bytes of data from a given InputeStream at the specified id.voidloadString(String attrId, Reader rd, char delimChar) Stores a String object by reading it in from a given character Reader.
-
Method Details
-
load
Stores a null attrubute (with no data) at the specified id Stored type is NAR.NULL_TYPE- Parameters:
attrId- String identifier for the field
-
load
Stores a given integer value at the specified id Stored type is NAR.BYTE_TYPE- Parameters:
attrId- String identifier for the fieldval- byte value to be stored in the given field
-
load
Stores a given integer value at the specified id Stored type is NAR.SHORT_TYPE- Parameters:
attrId- String identifier for the fieldval- short value to be stored in the given field
-
load
Stores a given integer value at the specified id Stored type is NAR.INT_TYPE- Parameters:
attrId- String identifier for the fieldval- integer value to be stored in the given field
-
load
Stores a given integer value at the specified id Stored type is NAR.LONG_TYPE- Parameters:
attrId- String identifier for the fieldval- long value to be stored in the given field
-
load
Stores a given floating point value at the specified id Stored type is NAR.FLOAT_TYPE- Parameters:
attrId- String identifier for the fieldval- float value to be stored in the given field
-
load
Stores a given floating point value at the specified id Stored type is NAR.DOUBLE_TYPE- Parameters:
attrId- String identifier for the fieldval- double value to be stored in the given field
-
load
Stores a data field given as a byte array at the specified id Stored type is NAR.BYTE_ARRAY_TYPE- Parameters:
attrId- String identifier for the fieldbarr- byte array to be stored in the given field
-
load
Stores a String object at the specified id Stored type is NAR.STRING_TYPE- Parameters:
attrId- String identifier for the fieldval- String object to be stored in the given field
-
loadByteArray
Stores a given number of bytes of data from a given InputeStream at the specified id. Stored type is NAR.BYTE_ARRAY_TYPE- Parameters:
attrId- String identifier for the fieldis- InputStream from which bytes will be readnbytes- Number of bytes to be read to create this data item- Throws:
IOException
-
loadBigEndian
void loadBigEndian(String attrId, int attrType, DataInputStream is) throws IOException, NonNumericTypeException Stores a numeric primitive, e.g. int, float, long, by reading in appropriate number of bytes from a given DataInputStream. The DataInputStream is assumed to contain the number in big-endian, or network byte order.- Parameters:
attrId- String identifier for the fieldattrType- an integer type id which should be one of NAR.INT_TYPE, NAR.FLOAT_TYPE, NAR.SHORT_TYPE, etc.dis- DataInputStream which contains the big-endian number at the current position of the input-stream.- Throws:
IOExceptionNonNumericTypeException
-
loadString
Stores a String object by reading it in from a given character Reader. The end of the string is recognized by the specified delimiting character. It is assumed that the default encoding of the platform is ASCII.- Parameters:
attrId- String identifier for the fieldrd- A character Reader from which char's are extracted until a delimChar is seen.delimChar- byte value of the separation character.- Throws:
IOException
-
load
Stores a given value of specified type with the specified id. Numeric values have to be given in network byte order, and strings have to be encoded with the platform's defualt encoding.- Parameters:
attrId- Identifier for the fieldtype- Data type for the fieldbarr- byte array containing the data valuebarrOffset- offset into the given byte array where field beginslen- number of bytes occupied by field
-