Examples of InputStreamFactory


Examples of org.teiid.core.types.InputStreamFactory

      throws SQLException {
    if (inputStream == null) {
      this.setObject(parameterIndex, null);
      return;
    }
    this.setObject(parameterIndex, new BlobImpl(new InputStreamFactory() {
      @Override
      public InputStream getInputStream() throws IOException {
        return inputStream;
      }
    }));
View Full Code Here

Examples of org.teiid.core.types.InputStreamFactory

  public void setClob(int parameterIndex, final Reader reader) throws SQLException {
    if (reader == null) {
      this.setObject(parameterIndex, null);
      return;
    }
    this.setObject(parameterIndex, new ClobImpl(new InputStreamFactory() {
     
      @Override
      public InputStream getInputStream() throws IOException {
        return new ReaderInputStream(reader, Charset.forName(Streamable.ENCODING));
      }
View Full Code Here

Examples of org.teiid.core.types.InputStreamFactory

          }
            if(currentValue instanceof ClobType){
              currentValue = new ClobImpl(createInputStreamFactory((ClobType)currentValue), ((ClobType)currentValue).getLength());
            }
            else if (currentValue instanceof BlobType) {
              InputStreamFactory isf = createInputStreamFactory((BlobType)currentValue);
              isf.setLength(((BlobType)currentValue).getLength());
              currentValue = new BlobImpl(isf);
            }
            else if (currentValue instanceof XMLType) {
              XMLType val = (XMLType)currentValue;
              currentValue = new SQLXMLImpl(createInputStreamFactory(val));
View Full Code Here

Examples of org.teiid.core.types.InputStreamFactory

        return currentValue;
    }
   
  private InputStreamFactory createInputStreamFactory(Streamable<?> type) {
    final StreamingLobChunckProducer.Factory factory = new StreamingLobChunckProducer.Factory(this.statement.getDQP(), this.requestID, type);
    InputStreamFactory isf = new InputStreamFactory() {
      @Override
      public InputStream getInputStream() throws IOException {
        return new LobChunkInputStream(factory.getLobChunkProducer());
      }
    };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.