Package org.teiid.client.lob

Examples of org.teiid.client.lob.LobChunkInputStream


    public void testGetChunk() throws Exception {
      byte[] bytes = "hello world".getBytes(); //$NON-NLS-1$
        ByteLobChunkStream stream = new ByteLobChunkStream(new ByteArrayInputStream(bytes), 5);

        assertTrue(Arrays.equals(bytes, ObjectConverterUtil.convertToByteArray(new LobChunkInputStream(stream))));           
    }
View Full Code Here


      @Override
      public void close() throws IOException {
       
      }
    };
        LobChunkInputStream stream = new LobChunkInputStream(chunkProducer);
       
        assertEquals("hello world", ObjectConverterUtil.convertToString(stream)); //$NON-NLS-1$
    }
View Full Code Here

  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());
      }
    };
    return isf;
  }
View Full Code Here

TOP

Related Classes of org.teiid.client.lob.LobChunkInputStream

Copyright © 2018 www.massapicom. 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.