oracle.sql.BLOB.getBytes()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(357)

本文整理了Java中oracle.sql.BLOB.getBytes()方法的一些代码示例,展示了BLOB.getBytes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BLOB.getBytes()方法的具体详情如下:
包路径:oracle.sql.BLOB
类名称:BLOB
方法名:getBytes

BLOB.getBytes介绍

暂无

代码示例

代码示例来源:origin: com.google.code.plsqlgateway/plsqlgateway-core

public byte[] get() {
  if (!isFormField)
   return blob.getBytes();
  else
   return bos.toByteArray();
}

代码示例来源:origin: com.google.code.plsqlgateway/plsqlgateway-core

public String getString(String charset) {
  String value;
  try {
      if (!isFormField)
        value= new String(blob.getBytes(),charset);
      else
        value= new String(bos.toByteArray(), charset);
  } catch (UnsupportedEncodingException e) {
    throw new RuntimeException(e);
  }
  logger.debug(fieldName+": "+value);
  return value;
}

代码示例来源:origin: com.bbossgroups/bboss-persistent

/**
 * Returns the bytes from a result set
 * 
 * @param res
 *            The ResultSet to read from
 * @param columnName
 *            The name of the column to read from
 * 
 * @return The byte value from the column
 */
public byte[] getBytesFromResultset(ResultSet res, String columnName)
    throws SQLException {
  // read the bytes from an oracle blob
  oracle.sql.BLOB blob = ((OracleResultSet) res).getBLOB(columnName);
  byte[] content = new byte[(int) blob.length()];
  content = blob.getBytes(1, (int) blob.length());
  return content;
}

代码示例来源:origin: io.snappydata/gemfire-hydra-tests

data = blob.getBytes(1,len);
if (DBParms.getDriverLogging()) {
    if (data.length == 0) {

相关文章