Package com.baulsupp.kolja.log.line.matcher

Examples of com.baulsupp.kolja.log.line.matcher.EntryPattern


    this.lineParser = lineParser;
    this.content = content;
  }

  public static FileLineIterator load(LogFormat format, File file, boolean end) throws IOException {
    EntryPattern entryPattern = format.getEntryPattern();
    LineParser lineParser = format.getLineParser();

    BufferingStringBuilder content = new FileBufferingStringBuilder(file, end);
    return new FileLineIterator(content, entryPattern, lineParser);
  }
View Full Code Here


  }

  public static FileLineIterator loadFromStdin(LogFormat format) throws IOException {
    ConfigurableLineFormat lineFormat = ((ConfigurableLogFormat) format).getLineFormat();

    EntryPattern entryPattern = lineFormat.getEntryPattern();

    BufferingStringBuilder content = new StreamBufferingStringBuilder(System.in);
    return new FileLineIterator(content, entryPattern, lineFormat.getLineParser());
  }
View Full Code Here

  public boolean supportsEvents() {
    return false;
  }

  public LineIndex getLineIndex(CharSequence buffer) {
    EntryPattern p = getEntryPattern();
    LogEntryIndex entryIndex = new MemoryLogEntryIndex(buffer, p);

    entryIndex = new BufferedLogEntryIndex(entryIndex);

    LogEntryLineIndex parsingLineIndex = new LogEntryLineIndex(entryIndex, buffer);
View Full Code Here

      return (lineNumber + 1) * (positionRead / linesRead + 1) + 100;
    }
  }

  public static LineNumberIndex create(CharSequence buffer) {
    EntryPattern p = new NewLineEntryPattern();
    MemoryLogEntryIndex rawIndex = new MemoryLogEntryIndex(buffer, p);
    BufferedLogEntryIndex entryIndex = new BufferedLogEntryIndex(rawIndex);

    return new BasicLineNumberIndex(entryIndex, buffer);
  }
View Full Code Here

TOP

Related Classes of com.baulsupp.kolja.log.line.matcher.EntryPattern

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.