java - 在ojdbc6中,unmarshalCLR和unmarshalUB1是做什么的?

标签 java jdbc ojdbc

在 ojdbc6 中,访问器可以在从数据库解码结果期间调用 oracle.jdbc.driver.T4CMAREngineunmarshalCLR 方法。在unmarshalCLR内部,还有这个unmashalUB1方法。

这两个方法有什么作用?

最佳答案

这是与 TNS 协议(protocol)相关的 Oracle 数据库特定事物。

谷歌搜索出现a spec ,尽管我不知道它有多准确或最新。

提及 CLR:

A CLR is a byte array in 64-byte blocks. If its length <=64, it is just length-byte-preceeded and written as native. Null arrays can be written as the single bytes 0x0 or 0xff. If length >64, first a LNG byte (0xfe) is written, then the array is written in length-byte-preceeded chunks of 64 bytes (although the final chunk can be shorter), followed by a 0 byte. A chunk preceeded by a length of 0xfe is ignored.

看起来 CLR 是一个编码的字节数组。

UB1 只是一个无符号字节(数据类型长度为 1 个字节)。

关于java - 在ojdbc6中,unmarshalCLR和unmarshalUB1是做什么的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31823310/

相关文章:

java - 应该在哪里?放在PreparedStatement中?

java - 我正在寻找 Vertx JDBC SQLite 驱动程序

java - 兼容 JDBC 的主存独立数据库

java - Spring oracle数据源不破坏连接

java - 如何提高 Oracle-DB 中 CLOB 和 LONG 值的查询性能(cx_Oracle 与 OJDBC)?

java - FFmpeg 命令将视频切割成更小的片段,无法以编程方式工作

java - 如何使用mockito进行模拟

java - SimpleDateFormat 返回无效日期

tomcat - 为什么我不应该在生产环境中打开 "antiJARLocking"?

java - 在条件中重新分配 Java 变量