Examples of readAhead()


Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

              // ignore key
              private final String IGNORE = " standalone=\"no\"?>";
             
        @Override
        public int read() throws IOException {
          if (IGNORE.equals(internal.readAhead(IGNORE.length()))) {
            // ignore everything except the last two characters
            internal.read(IGNORE.length() - 2);
          }

          // return the next character
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

      // skip \rs
      if (c == '\r') continue;
     
      if (Character.isWhitespace(c) /* && Character.isWhitespace(prev) */) {
        // skip
      } else if (c == '-' && reader.readAhead() == '-') {
        if (prev != -1 && !Character.isWhitespace(writer.previous())) {
          // we need to add whitespace before this comment
          writer.write(' ');
        }
       
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

         
          if (c == '\n')
            break;
        }
        writer.enableWordwrap(true)// re-enable wordwrap for comment
      } else if (c == 'p' && !Character.isJavaIdentifierPart(prev) && reader.has(7) && reader.readAhead(6).equals("rocess") && !Character.isJavaIdentifierPart(reader.readAhead(7).charAt(6))) {
        // 'process' keyword
        writer.write(c);
        writer.write(reader.read(6));
        writer.write(' ');
        prev = ' ';
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

         
          if (c == '\n')
            break;
        }
        writer.enableWordwrap(true)// re-enable wordwrap for comment
      } else if (c == 'p' && !Character.isJavaIdentifierPart(prev) && reader.has(7) && reader.readAhead(6).equals("rocess") && !Character.isJavaIdentifierPart(reader.readAhead(7).charAt(6))) {
        // 'process' keyword
        writer.write(c);
        writer.write(reader.read(6));
        writer.write(' ');
        prev = ' ';
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

        // 'process' keyword
        writer.write(c);
        writer.write(reader.read(6));
        writer.write(' ');
        prev = ' ';
      } else if (c == 'M' && reader.has(6) && reader.readAhead(5).equals("ODULE")) {
        // multiple modules will reduce the indent, since MODULE
        // does not have an ending statement
        if (writer.getIndentSize() != 0)
          writer.indentDecrease();
       
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

        // MODULE
        writer.newLine();
        writer.write(c);
        writer.write(reader.read(5));
        writer.write(' ');
      } else if (c == 'V' && reader.has(3) && reader.readAhead(2).equals("AR")) {
        // VAR
        writer.newLine();
        writer.newLine();
        writer.write(c);
        writer.write(reader.read(2));
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

        writer.newLine();
       
        // indent
        writer.indentIncrease();
        c = ' ';
      } else if (c == 'A' && reader.has(6) && reader.readAhead(5).equals("SSIGN")) {
        // unindent
        writer.indentDecrease();
       
        // ASSIGN
        writer.newLine();
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

        writer.newLine();
       
        // indent
        writer.indentIncrease();
        c = ' ';
      } else if (c == 'F' && reader.has(8) && reader.readAhead(7).equals("AIRNESS")) {
        // unindent
        writer.indentDecrease();
       
        // ASSIGN
        writer.newLine();
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

        writer.newLine();
       
        // indent
        writer.indentIncrease();
        c = ' ';
      } else if (c == 'L' && reader.has(7) && reader.readAhead(6).equals("TLSPEC")) {
        // unindent
        writer.indentDecrease();

        // LTLSPEC
        writer.newLine();
View Full Code Here

Examples of org.openiaml.iacleaner.inline.InlineStringReader.readAhead()

        // indent
        writer.indentIncrease();
        c = ' ';
       
        inLTL = true// now in LTL space
      } else if (c == 'c' && reader.has(4) && reader.readAhead(3).equals("ase") && Character.isWhitespace(reader.readAhead(4).charAt(3))) {
        // starting a case statement
        writer.write(c);
        writer.write(reader.read(3));
        writer.newLine();
       
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.