Package java.io

Examples of java.io.BufferedReader.reset()


       
        BufferedReader bufferedReader = new BufferedReader(reader);
        bufferedReader.mark(MARK_LIMIT);
        if (findEncoding(bufferedReader) != null)
            throw new ParseException("encoding declaration in Unicode string");
        bufferedReader.reset();

        return new ExpectedEncodingBufferedReader(bufferedReader, null);
    }

    private static ExpectedEncodingBufferedReader prepBufReader(InputStream input,
View Full Code Here


              relCount++;

            } else {

              // reset if not at the beginning of a line
              reader.reset();

              if (currentKey == null) {

                currentKey = (String)deserialize(reader);
View Full Code Here

                            + cellhd.getAbsolutePath());
                }
                cellhead = new BufferedReader(new FileReader(cellhd));
            } else {
                /* Push first line back onto buffered reader stack */
                cellhead.reset();
            }
            while( (line = cellhead.readLine()) != null ) {
                String[] lineSplit = line.split(":");
                if (lineSplit.length == 2) {
                    String key = lineSplit[0].trim();
View Full Code Here

            comment = line.substring(1);
          } else {
            comment = comment + "\n" + line.substring(1);
          }
        } else {
          reader.reset();
          break;
        }
      }
      loadChildren(reader);
      reader.close();
View Full Code Here

      while (bufferReader.readLine() != null) {
        countLine++;
      }
      traceMatrix = new String[countLine][4];
     
      bufferReader.reset();

      for (int i = 0; i < countLine; i++) {
        int next = 0;
        String trace = bufferReader.readLine();
        for (int j = 0; j < 4; j++) {
View Full Code Here

          }
          if (isMatch) {
            break;
          } else {
            // Need to reset the xmlIn and reload the xmlLine
            xmlIn.reset();
            xmlLine = xmlReadLine(xmlIn);
          }
        } else {
          continue;
        }
View Full Code Here

     
      while(true) {
        br.mark(1);
        int readChar = br.read();
        if(readChar == '\t') {
          br.reset();
          errorMessage = errorMessage + "\n" + br.readLine();
        } else {
          if(readChar != -1) {
            br.reset(); // reset not supported on EOF
          }
View Full Code Here

        if(readChar == '\t') {
          br.reset();
          errorMessage = errorMessage + "\n" + br.readLine();
        } else {
          if(readChar != -1) {
            br.reset(); // reset not supported on EOF
          }
          break;
        }
      }
     
View Full Code Here

        catch (XmlPullParserException e) {
            throw (IOException) new IOException("Error parsing content").initCause(e);
        }

        //reset input stream
        reader.reset();
       
        if (version == null) {
            LOGGER.warning("Could not determine SLD version from content. Assuming 1.0.0");
            version = "1.0.0";
        }
View Full Code Here

                    BufferedReader r = new BufferedReader(reader, limit);
                    r.mark(limit);
                    char b[] = new char[limit];
                    int i = r.read(b);
                    buffer.getPayload().append(b, 0, i);
                    r.reset();
                    message.setContent(Reader.class, r);
                } catch (Exception e) {
                    throw new Fault(e);
                }
               
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.