注意在J2ME中一个整数是4字节数据,而单字节长度表示法只需要1个字节。
Note that an integer in J2ME is 4 bytes of data, while single-byte length notation needs only 1 byte.
另一个问题在于,精确字段仅指定一个参数的最大长度,但是缓冲区需要针对组合起来的数据的最大尺寸调整大小。
Another problem is that precision fields only specify the maximum size of one parameter, but buffers need to be sized for the maximum size of all data combined instead.
没有模式就意味着文档可以拥有任何其需要的任何长度的数据。
Being without a schema means that a document can hold any data it requires, of any length.
与将XML数据作为CLOB或VARCHAR处理(这需要指定最大长度)相比,这是一项不错的改进。
That's a nice improvement over working with XML data as CLOBs or VARCHARs, which require maximum lengths.
除了实际的数据外,DB 2需要维护强制的null指示符(1个字节)和长度信息(4个字节)。
In addition to the actual data, DB2 needs to maintain the mandatory null indicator (1 byte) and length information (4 bytes).
现在您可以很容易确定队列的长度,但是您还需要一个脚本来处理这个数据。
Now that you can easily determine the length of the queue, you need a script to act on this data.
带标记的消息还需要分配可变长度的数据元素来存储检索数据值而带来的空间开销。
A tagged message also has the space overhead of allocating variable length data elements to store the retrieved data values.
一个更好的解决办法是对内存区的两段扫描:第一段只是计算新内存区的长度,随后我们分配内存和拷贝带有需要的替换的数据。
A better solution is a two-pass scan of the buffer: the first pass simply computes the length of the new buffer, after which we allocate the memory and copy the data with the required replacements.
一个更好的解决办法是对内存区的两段扫描:第一段只是计算新内存区的长度,随后我们分配内存和拷贝带有需要的替换的数据。
A better solution is a two-pass scan of the buffer: the first pass simply computes the length of the new buffer, after which we allocate the memory and copy the data with the required replacements.
应用推荐