【发布时间】:2015-03-26 02:46:27
【问题描述】:
我有一个返回 Blob 的 pl/sql 过程。我是这样称呼它的:
CallableStatement cstmt = null;
Blob blob = null;
cstmt = con.prepareCall("{? = call billing.PREQUEST.GetAttachment(?)}");
cstmt.registerOutParameter(1,
OracleTypes.BLOB);
cstmt.setInt(2, id);
cstmt.execute();
blob = cstmt.getBlob(1);
现在我想从 blob 中获取文件名。我该怎么做?
【问题讨论】:
-
保存了什么样的文件?通常大多数文件没有嵌入其中的名称...通常您会将元数据与二进制字节(文件名等)一起存储在单独的列或表中