org.teiid.core.types.XMLType.getBinaryStream()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(94)

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

XMLType.getBinaryStream介绍

暂无

代码示例

代码示例来源:origin: teiid/teiid

@Override
protected void writeReference(final DataOutput out) throws IOException {
  try {
    BlobType.writeBinary(out, getBinaryStream(), (int)length);
  } catch (SQLException e) {
    throw new IOException();
  }
}

代码示例来源:origin: org.teiid/teiid-common-core

@Override
protected void writeReference(final DataOutput out) throws IOException {
  try {
    BlobType.writeBinary(out, getBinaryStream(), (int)length);
  } catch (SQLException e) {
    throw new IOException();
  }
}

代码示例来源:origin: teiid/teiid

@Override
long computeLength() throws SQLException {
  if (this.reference instanceof SQLXMLImpl) {
    SQLXMLImpl impl = (SQLXMLImpl)this.reference;
    return impl.length();
  }
  return BaseLob.length(getBinaryStream());
}

代码示例来源:origin: org.teiid/teiid-common-core

@Override
long computeLength() throws SQLException {
  if (this.reference instanceof SQLXMLImpl) {
    SQLXMLImpl impl = (SQLXMLImpl)this.reference;
    return impl.length();
  }
  return BaseLob.length(getBinaryStream());
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

/**
 * Create a object which can create a sequence of LobChunk objects on a given
 * LOB object 
 * @throws SQLException 
 */
private ByteLobChunkStream createLobStream(String referenceStreamId) 
  throws TeiidComponentException, SQLException {
  
  // get the reference object in the buffer manager, and try to stream off
  // the original sources.
  Streamable<?> streamable = parent.resultsBuffer.getLobReference(referenceStreamId);
  
  if (streamable instanceof XMLType) {
    XMLType xml = (XMLType)streamable;
    return new ByteLobChunkStream(xml.getBinaryStream(), chunkSize);
  }
  else if (streamable instanceof ClobType) {
    ClobType clob = (ClobType)streamable;
    return new ByteLobChunkStream(new ReaderInputStream(clob.getCharacterStream(), Charset.forName(Streamable.ENCODING)), chunkSize);            
  } 
  BlobType blob = (BlobType)streamable;
  return new ByteLobChunkStream(blob.getBinaryStream(), chunkSize);                        
}

代码示例来源:origin: org.teiid/teiid-engine

/**
 * Create a object which can create a sequence of LobChunk objects on a given
 * LOB object 
 * @throws SQLException 
 */
private ByteLobChunkStream createLobStream(String referenceStreamId) 
  throws TeiidComponentException, SQLException {
  
  // get the reference object in the buffer manager, and try to stream off
  // the original sources.
  Streamable<?> streamable = parent.resultsBuffer.getLobReference(referenceStreamId);
  
  if (streamable instanceof XMLType) {
    XMLType xml = (XMLType)streamable;
    return new ByteLobChunkStream(xml.getBinaryStream(), chunkSize);
  }
  else if (streamable instanceof BaseClobType) {
    BaseClobType clob = (BaseClobType)streamable;
    return new ByteLobChunkStream(new ReaderInputStream(clob.getCharacterStream(), Charset.forName(Streamable.ENCODING)), chunkSize);            
  } 
  BlobType blob = (BlobType)streamable;
  return new ByteLobChunkStream(blob.getBinaryStream(), chunkSize);                        
}

代码示例来源:origin: teiid/teiid

/**
 * Create a object which can create a sequence of LobChunk objects on a given
 * LOB object 
 * @throws SQLException 
 */
private ByteLobChunkStream createLobStream(String referenceStreamId) 
  throws TeiidComponentException, SQLException {
  
  // get the reference object in the buffer manager, and try to stream off
  // the original sources.
  Streamable<?> streamable = parent.resultsBuffer.getLobReference(referenceStreamId);
  
  if (streamable instanceof XMLType) {
    XMLType xml = (XMLType)streamable;
    return new ByteLobChunkStream(xml.getBinaryStream(), chunkSize);
  }
  else if (streamable instanceof BaseClobType) {
    BaseClobType clob = (BaseClobType)streamable;
    return new ByteLobChunkStream(new ReaderInputStream(clob.getCharacterStream(), Charset.forName(Streamable.ENCODING)), chunkSize);            
  } 
  BlobType blob = (BlobType)streamable;
  return new ByteLobChunkStream(blob.getBinaryStream(), chunkSize);                        
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

is = new ReaderInputStream(value.getCharacterStream(), encoding);
} else {
  is = value.getBinaryStream();

代码示例来源:origin: org.teiid/teiid-engine

is = new ReaderInputStream(value.getCharacterStream(), encoding);
} else {
  is = value.getBinaryStream();

代码示例来源:origin: teiid/teiid

is = new ReaderInputStream(value.getCharacterStream(), encoding);
} else {
  is = value.getBinaryStream();

相关文章