Examples of ReaderInputStream


Examples of org.teiid.core.util.ReaderInputStream

    ObjectEncoderOutputStream out = new ObjectEncoderOutputStream(new DataOutputStream(baos), 512);
   
    ClobImpl clob = new ClobImpl(new InputStreamFactory() {
      @Override
      public InputStream getInputStream() throws IOException {
        return new ReaderInputStream(new StringReader("Clob contents"),  Charset.forName(Streamable.ENCODING)); //$NON-NLS-1$
      }
     
    }, -1);
   
    out.writeObject(clob);
View Full Code Here

Examples of org.teiid.core.util.ReaderInputStream

    }
    this.setObject(parameterIndex, new ClobImpl(new InputStreamFactory() {
     
      @Override
      public InputStream getInputStream() throws IOException {
        return new ReaderInputStream(reader, Charset.forName(Streamable.ENCODING));
      }
    }, -1));
  }
View Full Code Here

Examples of org.teiid.core.util.ReaderInputStream

                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);                       
        } catch(SQLException e) {
            throw new IOException(e);
View Full Code Here

Examples of org.teiid.core.util.ReaderInputStream

          InputStream is = null;
          try {
            if (file instanceof SQLXML) {
              is = ((SQLXML)file).getBinaryStream();
            } else if (file instanceof Clob) {
              is = new ReaderInputStream(((Clob)file).getCharacterStream(), encoding);
            } else if (file instanceof Blob) {
              is = ((Blob)file).getBinaryStream();
            } else {
              throw new TranslatorException(UTIL.getString("unknown_type")); //$NON-NLS-1$
            }
View Full Code Here

Examples of org.tuba.util.ReaderInputStream

        return;
      }
      viewCursor.goToRange(textRange, false);
      try {
        StringReader reader = new StringReader(textInfo.getText());
        InputStream is = new ReaderInputStream(reader);
        viewCursor.getTextCursorFromStart().insertDocument(is, RTFFilter.FILTER);
//        viewCursor.getTextCursorFromStart().insertDocument(is, HTMLFilter.FILTER);
      } catch (NOAException e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of org.wymiwyg.rwcf.impl.ReaderInputStream

      if ((body instanceof byte[])) {
        in = new ByteArrayInputStream((byte[])body);
       
      } else {
        if ((body instanceof Reader)) {
          in = new ReaderInputStream((Reader)body);
         
        } else {
          throw new RuntimeException("Body of type "+body.getClass()+" not yet supported");
        }
      }
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.