Package java.io

Examples of java.io.CharArrayReader


      expected[i] = (char) (this.random.nextInt(max - min) + min);
    }

    InputSinkChannel<Reader, S> channel = strategy.createReaderChannel();
   
    S sink = channel.write(new CharArrayReader(expected));
   
    Reader reader = channel.read(sink);
    try
    {
      char[] result = new char[Short.MAX_VALUE];
View Full Code Here


                               int    end,
                               int    startingLineNr)
        throws XMLParseException
    {
        try {
            Reader reader = new CharArrayReader(input, offset, end);
            this.parseFromReader(reader, startingLineNr);
        } catch (IOException e) {
            // This exception will never happen.
        }
    }
View Full Code Here

      }
   
    try
      {
        // check for sublcasses of reader
        new SimpleDoc(new CharArrayReader(new char[]{'A','b'}),
          DocFlavor.READER.TEXT_PLAIN, null);
        harness.check(true);
      }
    catch (RuntimeException e)
      {
View Full Code Here

      {
        harness.check(false);
      }
   
    SimpleDoc doc2 = new SimpleDoc(
      new CharArrayReader(new char[]{'A','b'}), DocFlavor.READER.TEXT_PLAIN, null);
                                                            
    try
      {
        Reader reader4 = doc2.getReaderForText();
        Reader reader5 = doc2.getReaderForText();
View Full Code Here

    public synchronized CharArrayReader toCharArrayReader()
    throws IOException {

        checkFreed();

        CharArrayReader reader = new CharArrayReader(buf, 0, count);

        //System.out.println("toCharArrayReader::buf.length: " + buf.length);
        free();

        return reader;
View Full Code Here

        this.publicId = publicId;
    }

    protected JDBCSQLXML(char[] chars, int offset, int length,
                         String systemId) throws SQLException {
        this(new StreamSource(new CharArrayReader(chars, offset, length),
                              systemId));
    }
View Full Code Here

                }

                testChars[i] = (char) j;
            }

            ps.setCharacterStream(1, new CharArrayReader(testChars),
                                  testChars.length);
            ps.executeUpdate();

            String dq2 = "select clobfield from clobtest;";
View Full Code Here

                }

                testChars[i] = (char) j;
            }

            ps.setCharacterStream(1, new CharArrayReader(testChars),
                                  testChars.length);
            ps.executeUpdate();

            String dq2 = "select clobfield from clobtest;";
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

   * @throws IOException
   *             If an I/O related problem occurs
   */
  public BufferedReader getReader() throws IOException
  {
    return new BufferedReader(new CharArrayReader(new char[0]));
  }
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.