本文整理了Java中java.sql.Clob.getAsciiStream()
方法的一些代码示例,展示了Clob.getAsciiStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Clob.getAsciiStream()
方法的具体详情如下:
包路径:java.sql.Clob
类名称:Clob
方法名:getAsciiStream
[英]Gets the value of this Clob object as an ASCII stream.
[中]获取此Clob对象作为ASCII流的值。
代码示例来源:origin: alibaba/druid
public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException {
Clob clob = rs.getClob(columnIndex);
if (clob == null) {
return null;
}
return clob.getAsciiStream();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException {
logger.debug("Returning CLOB as ASCII stream");
if (this.wrapAsLob) {
Clob clob = rs.getClob(columnIndex);
return clob.getAsciiStream();
}
else {
return rs.getAsciiStream(columnIndex);
}
}
代码示例来源:origin: alibaba/druid
@Override
public java.io.InputStream clob_getAsciiStream(ClobProxy clob) throws SQLException {
if (this.pos < filterSize) {
return nextFilter().clob_getAsciiStream(this, clob);
}
return clob.getRawClob().getAsciiStream();
}
代码示例来源:origin: SonarSource/sonarqube
if (value instanceof Clob) {
Clob clob = (Clob) value;
value = IOUtils.toString((clob.getAsciiStream()));
doClobFree(clob);
} else if (value instanceof BigDecimal) {
代码示例来源:origin: postgresql/postgresql
InputStream l_inStream = x.getAsciiStream();
int l_length = (int) x.length();
LargeObjectManager lom = connection.getLargeObjectAPI();
代码示例来源:origin: hibernate/hibernate-orm
@Override
public Clob mergeClob(Clob original, Clob target, SharedSessionContractImplementor session) {
if ( original != target ) {
try {
// the CLOB just read during the load phase of merge
final OutputStream connectedStream = target.setAsciiStream( 1L );
// the CLOB from the detached state
final InputStream detachedStream = original.getAsciiStream();
StreamCopier.copy( detachedStream, connectedStream );
return target;
}
catch (SQLException e ) {
throw session.getFactory().getSQLExceptionHelper().convert( e, "unable to merge CLOB data" );
}
}
else {
return NEW_LOCATOR_LOB_MERGE_STRATEGY.mergeClob( original, target, session );
}
}
代码示例来源:origin: apache/nifi
long numChars = clob.length();
char[] buffer = new char[(int) numChars];
InputStream is = clob.getAsciiStream();
int index = 0;
int c = is.read();
代码示例来源:origin: com.alibaba/druid
public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException {
Clob clob = rs.getClob(columnIndex);
if (clob == null) {
return null;
}
return clob.getAsciiStream();
}
代码示例来源:origin: com.alibaba/druid
@Override
public java.io.InputStream clob_getAsciiStream(ClobProxy clob) throws SQLException {
if (this.pos < filterSize) {
return nextFilter().clob_getAsciiStream(this, clob);
}
return clob.getRawClob().getAsciiStream();
}
代码示例来源:origin: geotools/geotools
return null;
InputStream in = clob.getAsciiStream();
try {
return new WKTReader(factory).read(new InputStreamReader(in));
代码示例来源:origin: schemacrawler/SchemaCrawler
rdr = new InputStreamReader(clob.getAsciiStream());
代码示例来源:origin: io.snappydata/gemfirexd
/**
* {@inheritDoc}
*/
@Override
public InputStream getAsciiStream() throws SQLException {
return this.clob.getAsciiStream();
}
代码示例来源:origin: io.snappydata/gemfirexd-core
/**
* {@inheritDoc}
*/
@Override
public InputStream getAsciiStream() throws SQLException {
return this.clob.getAsciiStream();
}
代码示例来源:origin: sismics/reader
protected String getString(Clob clob) {
try {
InputStream in = clob.getAsciiStream();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
IOUtils.copy(in, baos);
return baos.toString();
} catch (Exception e) {
throw new RuntimeException("Error reading clob", e);
}
}
代码示例来源:origin: com.bbossgroups/bboss-util
public static void sendFile(HttpServletRequest request, HttpServletResponse response, String filename, Clob clob) throws Exception {
if (clob == null)
return;
sendFile_(request, response, filename, clob.getAsciiStream(), clob.length());
}
代码示例来源:origin: org.springframework/org.springframework.jdbc
public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException {
logger.debug("Returning CLOB as ASCII stream");
if (this.wrapAsLob) {
Clob clob = rs.getClob(columnIndex);
return clob.getAsciiStream();
}
else {
return rs.getAsciiStream(columnIndex);
}
}
代码示例来源:origin: com.mckoi/mckoisqldb
public java.io.InputStream getAsciiStream(int columnIndex)
throws SQLException {
Clob c = getClob(columnIndex);
if (c == null) {
return null;
}
else {
return c.getAsciiStream();
}
}
代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.net.sourceforge.jtds
public InputStream getAsciiStream(int columnIndex) throws SQLException {
Clob clob = getClob(columnIndex);
if (clob == null) {
return null;
}
return clob.getAsciiStream();
}
代码示例来源:origin: io.snappydata/snappydata-store-shared
@Override
public InputStream toAsciiStream(OptimizedElementArray row, int columnPosition,
LobService lobService) throws SQLException {
Clob clob = (Clob)row.getObject(columnPosition - 1);
return clob.getAsciiStream();
}
@Override
代码示例来源:origin: apache/servicemix-bundles
@Override
public InputStream getClobAsAsciiStream(ResultSet rs, int columnIndex) throws SQLException {
logger.debug("Returning Oracle CLOB as ASCII stream");
Clob clob = rs.getClob(columnIndex);
initializeResourcesBeforeRead(rs.getStatement().getConnection(), clob);
InputStream retVal = (clob != null ? clob.getAsciiStream() : null);
releaseResourcesAfterRead(rs.getStatement().getConnection(), clob);
return retVal;
}
内容来源于网络,如有侵权,请联系作者删除!