Package java.io

Examples of java.io.CharArrayReader


        }
      }
      else {
        chars = (char[]) value;
      }
      CharArrayReader reader = new CharArrayReader( chars );
      st.setCharacterStream( index, reader, chars.length );
    }
    else {
      st.setNull( index, sqlTypes()[0] );
    }
View Full Code Here


    return xmlToString(node, Format.getCompactFormat());
  }
 
  private IConstructor parseXMLDOM(IString str, boolean trim) throws JDOMException, IOException {
    SAXBuilder builder = new SAXBuilder();
    CharArrayReader reader = new CharArrayReader(str.getValue().toCharArray());
    Document doc = builder.build(reader);
    return convertDocument(doc, trim);
  }
View Full Code Here

        // validate against schema.
        try {
            URL schema = Resources.getResource("/catalog.xsd");
            Validator validator = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema").newSchema(schema)
                    .newValidator();
            Source source = new StreamSource(new CharArrayReader(xml.toCharArray()));
            validator.validate(source);
        } catch (Exception e) {
            this.errorHolder.addErrorMessage("Validation Error", e);
            return null;
        }
View Full Code Here

  }

  public TranslationUnit parse(String source, NodeDictionary dict)
      throws Exception {
    RootBuilder builder = new RootBuilder(dict);
    Reader reader = new CharArrayReader(source.toCharArray());
    InternalLexer lexer = new InternalLexer(reader);
    InternalParser parser = new InternalParser(lexer);
    parser.translation_unit(builder);
    return builder.getNode();
  }
View Full Code Here

   
    public void insertClobForStreamingLoad(Row row, Column col, Object ob)
    throws SQLException {
        if (ob != null) {
        row.setCharacterStream(col,
                new CharArrayReader(new char[0]), 0);
        } else {
            row.setNull(col);
        }
    }
View Full Code Here

    // capture the output of the XMLWriter
    final CharArrayWriter w = new CharArrayWriter();
    XMLWriter.writeResponse(w,request,response);
   
    // and write transformed result to our writer
    final Reader r = new BufferedReader(new CharArrayReader(w.toCharArray()));
    final StreamSource source = new StreamSource(r);
    final StreamResult result = new StreamResult(writer);
    try {
      t.transform(source, result);
    } catch(TransformerException te) {
View Full Code Here

                                    }
                                }
                            }
                        }

                        delegate = new CharArrayReader(writer.toCharArray());
                    } finally {
                        in.close();
                    }
                }
            };
View Full Code Here

                            PDFTextStripper stripper = new PDFTextStripper();
                            stripper.setLineSeparator("\n");
                            stripper.writeText(document, writer);

                            delegate = new CharArrayReader(writer.toCharArray());
                        } finally {
                            document.close();
                        }
                    } finally {
                        in.close();
View Full Code Here

   
    public void insertClobForStreamingLoad(Row row, Column col, Object ob)
    throws SQLException {
        if (ob != null) {
        row.setCharacterStream(col,
                new CharArrayReader(new char[0]), 0);
        } else {
            row.setNull(col);
        }
    }
View Full Code Here

     * etc in this stream.
     *
     * @return the value of this BodyJspWriter as a Reader
     */
    public Reader getReader() {
        return (writer == null) ? new CharArrayReader (cb, 0, nextChar) : null;
    }
View Full Code Here

TOP

Related Classes of java.io.CharArrayReader

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.