Package java.io

Examples of java.io.StringReader.reset()


                reader = new StringReader(headerValue);
                // get the first character to decide - expect '(' or '<'
                try {
                    reader.mark(1);
                    firstChar = readWhiteSpace(reader);
                    reader.reset();
                } catch (IOException ignore) {
                    // may be thrown according to API but is only thrown by the
                    // StringReader class if the reader is already closed.
                }
View Full Code Here


                reader = new StringReader(headerValue);
                // get the first character to decide - expect '(' or '<'
                try {
                    reader.mark(1);
                    firstChar = readWhiteSpace(reader);
                    reader.reset();
                } catch (IOException ignore) {
                    // may be thrown according to API but is only thrown by the
                    // StringReader class if the reader is already closed.
                }
View Full Code Here

        throws SQLException {
    Reader clobInput = new StringReader(clobData);
        PreparedStatement pStmt =
            con.prepareStatement("update BLOBCLOB set CLOBDATA = ? where ID = ?");
        try {
            clobInput.reset();
        } catch (IOException ioe) {
            fail("Failed to reset clob input stream: " + ioe.getMessage());
        }
        pStmt.setClob(1, clobInput, clobData.length());
        pStmt.setInt(2, ID_SAMPLEVALUES);
View Full Code Here

      idx = jsniCode.indexOf('@', idx);
      if (idx < 0) {
        break;
      }
      try {
        reader.reset();
        // Ignore return value, since we know the index is valid.
        reader.skip(idx);
      } catch (IOException e) {
        throw new InternalCompilerException(e.getMessage(), e);
      }
View Full Code Here

  harness.fail("Unexpected IOException on read(buf, off, len)");
  }
  String bufstr = new String(buf);
  harness.check(bufstr, "Ther", "read(buf, off, len)");
  try {    // 1.1 API does not correctly document this exception
    sr.reset();
  }
  catch (IOException e) {
  harness.fail("Unexpected IOException on reset()");
  }
  harness.check(true, "reset()");
View Full Code Here

      idx = jsniCode.indexOf('@', idx);
      if (idx < 0) {
        break;
      }
      try {
        reader.reset();
        reader.skip(idx);
      } catch (IOException e) {
        throw new InternalCompilerException(e.getMessage(), e);
      }
      String jsniRefString = readJsIdentifier(reader);
View Full Code Here

        //insert default values into the table
       
        String str = "Test data for the Clob object";
        StringReader is = new StringReader("Test data for the Clob object");
        is.reset();
       
        //initially insert the data
        psInsertClob.setInt(1, key);
        psInsertClob.setClob(2, is, str.length());
        psInsertClob.executeUpdate();
View Full Code Here

     */
    public void testSetCharacterStream() throws Exception {
        String str = "Test data for the Clob object";
        StringReader is = new StringReader("Test data for the Clob object");
       
        is.reset();
       
        //initially insert the data
        psInsertClob.setInt(1, key);
        psInsertClob.setCharacterStream(2, is, str.length());
        psInsertClob.executeUpdate();
View Full Code Here

                reader = new StringReader(headerValue);
                // get the first character to decide - expect '(' or '<'
                try {
                    reader.mark(1);
                    firstChar = readWhiteSpace(reader);
                    reader.reset();
                } catch (IOException ignore) {
                    // may be thrown according to API but is only thrown by the
                    // StringReader class if the reader is already closed.
                }
View Full Code Here

                reader = new StringReader(headerValue);
                // get the first character to decide - expect '(' or '<'
                try {
                    reader.mark(1);
                    firstChar = readWhiteSpace(reader);
                    reader.reset();
                } catch (IOException ignore) {
                    // may be thrown according to API but is only thrown by the
                    // StringReader class if the reader is already closed.
                }
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.