Public Member Functions | |
TypedUbf (AtmiCtx ctx, boolean doFinalize, long cPtr, long len) | |
native void | Badd (int bfldid, short s) |
native void | Badd (int bfldid, long l) |
native void | Badd (int bfldid, byte c) |
native void | Badd (int bfldid, float f) |
native void | Badd (int bfldid, double d) |
native void | Badd (int bfldid, String s) |
native void | Badd (int bfldid, byte[]b) |
native void | Bprint () |
native short | BgetShort (int bfldid, int occ) |
native long | BgetLong (int bfldid, int occ) |
native byte | BgetByte (int bfldid, int occ) |
native float | BgetFloat (int bfldid, int occ) |
native double | BgetDouble (int bfldid, int occ) |
native String | BgetString (int bfldid, int occ) |
native byte[] | BgetByteArr (int bfldid, int occ) |
native void | Baddfast (int bfldid, short s, BFldLocInfo next_fld) |
native void | Baddfast (int bfldid, long l, BFldLocInfo next_fld) |
native void | Baddfast (int bfldid, byte c, BFldLocInfo next_fld) |
native void | Baddfast (int bfldid, float f, BFldLocInfo next_fld) |
native void | Baddfast (int bfldid, double d, BFldLocInfo next_fld) |
native void | Baddfast (int bfldid, String s, BFldLocInfo next_fld) |
native void | Baddfast (int bfldid, byte[]b, BFldLocInfo next_fld) |
native void | Bchg (int bfldid, int occ, short s) |
native void | Bchg (int bfldid, int occ, long l) |
native void | Bchg (int bfldid, int occ, byte c) |
native void | Bchg (int bfldid, int occ, float f) |
native void | Bchg (int bfldid, int occ, double d) |
native void | Bchg (int bfldid, int occ, String s) |
native void | Bchg (int bfldid, int occ, byte[]b) |
native boolean | Bboolev (BExprTree tree) |
native boolean | Bqboolev (String expr) |
native double | Bfloatev (BExprTree tree) |
native void | Bdel (int bfldid, int occ) |
native void | Bdelall (int bfldid) |
native boolean | Bpres (int bfldid, int occ) |
native void | Bextread (BufferedReader reader) |
native boolean | Bisubf () |
native int | Blen (int bfldid, int occ) |
native BNextResult | Bnext (boolean first) |
native int | Boccur (int bfldid) |
native void | Bread (byte[] data) |
native byte[] | Bwrite () |
native long | Bsizeof () |
native long | Bunused () |
native long | Bused () |
native long | Binit () |
native void | Bproj (int bfldid[]) |
native void | Bdelete (int[] bfldid) |
native void | Bconcat (TypedUbf src) |
native void | Bcpy (TypedUbf src) |
native void | Bprojcpy (TypedUbf src, int[] bfldida) |
native void | Bupdate (TypedUbf src) |
native int | Bcmp (TypedUbf ub2) |
native boolean | Bsubset (TypedUbf needle) |
void | marshal (Object o) |
void | marshal (Object o, int occ) |
void | unmarshal (Object o) |
void | unmarshal (Object o, int occ) |
native void | tpjsontoubf (String json) |
native String | tpubftojson () |
native void | tplogprintubf (int lev, String title) |
native int | Bnum () |
native void | Bjoin (TypedUbf src) |
native void | Bojoin (TypedUbf src) |
Static Public Attributes | |
static final int | BBADFLDID = 0 |
static final int | BFIRSTFLDID = 0 |
static final int | BBADFLDOCC = 0 |
static final int | BFLDOCCMAX = 128 |
Package Functions | |
long | boolcbfDispatch (String funcname) |
Static Package Functions | |
[static initializer] |
org.endurox.TypedUbf.TypedUbf | ( | AtmiCtx | ctx, | |
boolean | doFinalize, | |||
long | cPtr, | |||
long | len | |||
) |
Initialize UBF Object
ctx[in] | ATMI Context allocated this method | |
doFinalize[in] | Should | |
cPtr[in] | C pointer to allocated block | |
len[in] | Conditional buffer length |
org.endurox.TypedUbf.[static initializer] | ( | ) | [static, package] |
Reimplemented from org.endurox.TypedBuffer.
native int org.endurox.TypedUbf.Bcmp | ( | TypedUbf | ub2 | ) |
Compare this UBF buffer with second UBF buffer passed in the argument. See Bcmp(3) manpage for more information.
ub2 | UBF buffer to compare this with given buffer. |
ub2
or value of field is lesser than ub2
then -1 is returned. In the same way if this buffer is greater ub2
, then value 1 is returned. UbfBEINVALException | this buffer or ub2 are have NULL pointers wrapped in the objects - corrupted buffer. | |
UbfBNOTFLDException | this buffer or ub2 buffers not fielded, not correctly allocated or corrupted - corrupted buffer. |
native void org.endurox.TypedUbf.Bconcat | ( | TypedUbf | src | ) |
Concatenate source buffer from src
to this object buffer. Method will add any field from source buffer to destination buffer by using Badd(3) function call. See Bsizeof(3) manpage for more information.
src | source buffer to copy from. |
UbfBALIGNERRException | Source or dest buffer corrupted or pointing to not aligned memory area. | |
UbfBNOTFLDException | Source or dest buffer not fielded, not correctly allocated or corrupted. | |
UbfBNOSPACEException | No space left in target buffer. |
native void org.endurox.TypedUbf.Bcpy | ( | TypedUbf | src | ) |
Copy buffer from source (src
) to this objects buffer. See Bcpy(3) manpage for more information.
src | source buffer copy data from |
UbfBNOTFLDException | Source or dest buffer not fielded, not correctly allocated or corrupted. | |
UbfBNOSPACEException | No space left in target buffer. |
native void org.endurox.TypedUbf.Bdelete | ( | int[] | bfldid | ) |
Delete list of fields from UBF buffer For more information see Bdelete(3) manpage.
bfldid | array of fields which needs to be deleted. Note that as Java have array length information, no BBADFLDID is required at the end of the array. |
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. |
native void org.endurox.TypedUbf.Bextread | ( | BufferedReader | reader | ) |
Restore UBF buffer from printed text buffer in the stream. For data format description see Bextread(3) manpage. Basically format is: <FIELDNAME>
reader | input stream interface. The stream will be read line by line UbfBALIGNERRException Corrupted buffer or pointing to not aligned memory area. UbfBNOTFLDException Buffer not fielded, not correctly allocated or corrupted. UbfBSYNTAXException Missing tab between field id or missing newline. UbfBBADNAMEException Field not found in field table. |
native long org.endurox.TypedUbf.Binit | ( | ) |
Initialize UBF buffer to allocated size. This can be effectively used to reset the UBF buffer to initial state - erase all infos from the buffer.
UbfBNOTFLDException | internal error, buffer NULL. | |
UbfBALIGNERRException | align error (internal err). | |
UbfBNOSPACEException | buffer too short. The sizeof(UBF_header_t) is minimum size of buffer. |
native boolean org.endurox.TypedUbf.Bisubf | ( | ) |
Test UBF buffer to see does underlying memory corresponds to the UBF format. For more information see Bisubf(3) manpage.
native void org.endurox.TypedUbf.Bjoin | ( | TypedUbf | src | ) |
Join UBF buffer. This object is destination. Leave in this object only matching field IDs and occurrences. Matched fields are updated from source buffer. Non matched fields are removed from UBF buffer.
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. src is NULL. | |
UbfFBADFLDException | Invalid field type. |
src[in] | source buffer |
native int org.endurox.TypedUbf.Blen | ( | int | bfldid, | |
int | occ | |||
) |
Return field length in bytes (used bytes). For strings including EOS.
bfldid | compiled field id generated by mkfldhdr(8). | |
occ | field occurrence |
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. p_ub is NULL. | |
UbfBBADFLDException | Invalid field id passed. | |
UbfBNOTPRESException | Field not present. |
native BNextResult org.endurox.TypedUbf.Bnext | ( | boolean | first | ) |
Iterate over the UBF buffer fields. This method returns all field ids and their corresponding occurrences in the buffer. see Bnext(3) manpage for more information.
first | Restart the iteration. |
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLD | Buffer not fielded, not correctly allocated or corrupted. | |
UbfBNOSPACE | No space in buf. |
native int org.endurox.TypedUbf.Bnum | ( | ) |
Return number of fields in UBF buffer
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. p_ub is NULL. | |
UbfFBADFLDException | Invalid field type. |
native int org.endurox.TypedUbf.Boccur | ( | int | bfldid | ) |
Get number of field occurrences in UBF buffer see Boccur(3) manpage for more information.
bfldid | compiled field id |
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. Or C buffer ptr is NULL. | |
UbfFBADFLDException | Invalid field type. |
native void org.endurox.TypedUbf.Bojoin | ( | TypedUbf | src | ) |
Outer join UBF buffer. This object is destination. Method updates matched fields/occurrences in this buffer. The non matched fields are left un-touched. Non matched fields from src
is not added to this buffer.
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. src is NULL. | |
UbfFBADFLDException | Invalid field type. |
src[in] | source buffer |
native boolean org.endurox.TypedUbf.Bpres | ( | int | bfldid, | |
int | occ | |||
) |
Test for field presence in UBF buffer. For more information see Bpres(3) manpage.
bfldid | compiled UBF buffer id | |
occ | field occurrence (0 based). |
native void org.endurox.TypedUbf.Bprint | ( | ) |
Print the UBF buffer to STDOUT
AtmiBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
AtmiBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. |
native void org.endurox.TypedUbf.Bproj | ( | int | bfldid[] | ) |
This method removes any un-needed field from UBF buffer and keeps only the list of field identifiers found in bfldlist array. As Java keeps the array length internally, the array shall not be terminated with BBADFLDID as in case for C. see Boccur(3) manpage for more information.
bfldid | array of |
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. |
native void org.endurox.TypedUbf.Bprojcpy | ( | TypedUbf | src, | |
int[] | bfldida | |||
) |
Copy a list from src
buffer fields to this buffer. This list of fields is marked in bfldid
argument. This list shall not be terminated with BBADFLDID as for Java arrays are self describing. See Bprojcpy(3) manpage for more information.
src | source UBF buffer to copy fields from | |
bfldida | list of fields to copy to this buffer/object |
UbfBALIGNERRException | Source or dest buffer corrupted or pointing to not aligned memory area. | |
UbfBNOTFLDException | Source or dest buffer not fielded, not correctly allocated or corrupted. | |
UbfBNOSPACEException | No space left in target buffer. |
native void org.endurox.TypedUbf.Bread | ( | byte[] | data | ) |
Read the UBF buffer from input stream. This read binary/platform specific version of the UBF buffer, produced either by memory dump or by Bwrite() method. see Bread(3) manpage for more information.
data | byte array containing the buffer image |
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. | |
UbfBEINVALException | internal error (invalid read function) | |
UbfBEUNIXException | Failed to read from stream. |
native long org.endurox.TypedUbf.Bsizeof | ( | ) |
Return buffer size in bytes, this includes the header data too. See Bsizeof(3) manpage for more information.
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. p_ub is NULL. |
native boolean org.endurox.TypedUbf.Bsubset | ( | TypedUbf | needle | ) |
Test that UBF buffer 2 (present in needle
) is part of the this UBF buffer.
needle | to search in this buffer |
needle
is part of the this buffer, false - needle is not part of this UBF buffer. UbfBEINVALException | this buffer or needle are NULL pointers - corrupted UBF buffer. | |
UbfBNOTFLDException | this buffer or needle buffers not fielded, not correctly allocated or corrupted - corrupted buffers. |
native long org.endurox.TypedUbf.Bunused | ( | ) |
Return free space of the UBF buffer. The number is given in bytes. See Bunused(3) manpage for more information.
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. |
native void org.endurox.TypedUbf.Bupdate | ( | TypedUbf | src | ) |
Update this object from source buffer. Any matching field occurrences are replaced or added from src
buffer to this buffer. See Bupdate(3) manpage for more information.
src | source buffer to take data from |
UbfBALIGNERRException | Source or dest buffer corrupted or pointing to not aligned memory area. | |
UbfBNOTFLDException | Source or dest buffer not fielded, not correctly allocated or corrupted. | |
UbfBNOSPACEException | No space left in target buffer. |
native long org.endurox.TypedUbf.Bused | ( | ) |
Return number of bytes used by UBF buffer. See Bused(3) manpage for more information.
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. Internal ptr is NULL. |
native byte [] org.endurox.TypedUbf.Bwrite | ( | ) |
Write the buffer to byte array. The produced result is platform specific version of buffer dump. For cross platform dump, use either Bfprint() or Bprint(). See Bwrite(3) manpage for more information.
UbfBALIGNERRException | Corrupted buffer or pointing to not aligned memory area. | |
UbfBNOTFLDException | Buffer not fielded, not correctly allocated or corrupted. | |
UbfBEINVALException | Internal error. | |
UbfBEUNIXException | Failed to read from stream. | |
UbfBNOSPACEException | No space in UBF buffer. |
void org.endurox.TypedUbf.marshal | ( | Object | o, | |
int | occ | |||
) |
Copy object fields to UBF (serialize)
o | object which shall be copied to this UBF | |
occ | occurrence to serialize |
UbfBEUNIXException | cannot get field value from object, access problem, either got: IllegalAccessException/IllegalArgumentException/ InvocationTargetException or IntrospectionException exception | |
UbfBNOTPRESException | two few object array elements ("objmin" not reached). | |
UbfBSYNTAXException | Invalid mapped field type. Enduro/X for Java supports only following data types: short,Short,long,Long,byte,Byte,float, Float,double,Double,String,byte[]. | |
UbfBALIGNERRException | Invalid Buffer | |
UbfBNOTFLDException | Invalid Buffer | |
UbfBNOSPACEException | No space in buffer | |
UbfBBADFLDException | No space in buffer |
void org.endurox.TypedUbf.marshal | ( | Object | o | ) |
Copy object fields to UBF (serialize)
o | object which shall be copied to this UBF |
UbfBEUNIXException | cannot get field value from object, access problem, either got: IllegalAccessException/IllegalArgumentException/ InvocationTargetException or IntrospectionException exception | |
UbfBNOTPRESException | two few object array elements ("objmin" not reached). | |
UbfBSYNTAXException | Invalid mapped field type. Enduro/X for Java supports only following data types: short,Short,long,Long,byte,Byte,float, Float,double,Double,String,byte[]. | |
UbfBALIGNERRException | Invalid Buffer | |
UbfBNOTFLDException | Invalid Buffer | |
UbfBNOSPACEException | No space in buffer | |
UbfBBADFLDException | No space in buffer |
native void org.endurox.TypedUbf.tpjsontoubf | ( | String | json | ) |
Restore UBF buffer from JSON. it is assumed that there is enough space in UBF buffer to store all data. see tpjsontoubf(3) manpage for more information.
AtmiTPEINVALException | Invalid JSON or invalid base64 encoding, | |
AtmiTPESYSTEMException | UBF sub-system error, JSON sub-system error. | |
AtmiTPEOSException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. In case of insufficient memory this error will be generated too. |
json | JSON string |
native void org.endurox.TypedUbf.tplogprintubf | ( | int | lev, | |
String | title | |||
) |
Print UBF buffer to TPLOG
[in] | lev | log level see AtmiConstants.LOG_... |
[in] | title | Title of UBF buffer dump |
native String org.endurox.TypedUbf.tpubftojson | ( | ) |
Convert UBF buffer to JSON string see tpubftojson(3) manpage for more information.
AtmiTPESYSTEMException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. Might be insufficient memory, JSON or UBF library failure. | |
AtmiTPEOSException | Not enough space in output buffer. |
void org.endurox.TypedUbf.unmarshal | ( | Object | o, | |
int | occ | |||
) |
Copy UBF fields to object(deserialize)
o | object o which copy UBF data | |
occ | array element occurrence to copy |
UbfBEUNIXException | ||
UbfBNOTPRESException | ||
UbfBSYNTAXException | Error while accessing object o . Problem with setter methods. Got either exception: IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException. | |
UbfBALIGNERRException | Invalid UBF Buffer | |
UbfBNOTFLDException | Invalid UBF Buffer | |
UbfBNOSPACEException | No space in buffer (temp buffer for read) | |
UbfBNOTPRESException | UBF buffer does not meet "ubfmin" annotation minimum fields. |
void org.endurox.TypedUbf.unmarshal | ( | Object | o | ) |
Copy UBF fields to object (deserialize) This buffer is reset before filling in with data from o
.
o | object to which copy the UBF data |
UbfBEUNIXException | ||
UbfBNOTPRESException | ||
UbfBSYNTAXException | Error while accessing object o . Problem with setter methods. Got either exception: IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException. | |
UbfBALIGNERRException | Invalid UBF Buffer | |
UbfBNOTFLDException | Invalid UBF Buffer | |
UbfBNOSPACEException | No space in buffer (temp buffer for read) | |
UbfBNOTPRESException | UBF buffer does not meet "ubfmin" annotation minimum fields. |