Package org.teiid.core.types.InputStreamFactory

Examples of org.teiid.core.types.InputStreamFactory.ClobInputStreamFactory


      return new ClobType(clob);
    }
   
    public static Blob toBytes(ClobType value, String encoding) throws IOException {
      Charset cs = getCharset(encoding);
      ClobInputStreamFactory cisf = new ClobInputStreamFactory(value.getReference());
      cisf.setCharset(cs);
      if (CharsetUtils.BASE64_NAME.equalsIgnoreCase(encoding) || CharsetUtils.HEX_NAME.equalsIgnoreCase(encoding)) {
        //validate that the binary conversion is possible
        //TODO: cache the result in a filestore
        InputStream is = cisf.getInputStream();
        try {
          while (is.read() != -1) {
           
          }
        } finally {
View Full Code Here

TOP

Related Classes of org.teiid.core.types.InputStreamFactory.ClobInputStreamFactory

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.