dip.judge.parser
Class ParserUtils

java.lang.Object
  extended bydip.judge.parser.ParserUtils

public class ParserUtils
extends java.lang.Object

Utilities & Constants used by the parser classes


Field Summary
static int SHORT_LINE
          Lines less than this long are ignored.
 
Method Summary
static java.lang.String filter(java.lang.String in)
          Coalesces whitespace, and ensures that it's only spaces and not any other type
static java.lang.String getNextLongLine(java.io.BufferedReader br)
          Gets the next non-short line from a buffered reader.
static java.lang.String parseBlock(java.io.BufferedReader br)
          Begins reading text line-by-line Starts with first non-short line, adds text until we get a blank line, returns text in-between.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHORT_LINE

public static final int SHORT_LINE
Lines less than this long are ignored.

See Also:
Constant Field Values
Method Detail

parseBlock

public static java.lang.String parseBlock(java.io.BufferedReader br)
                                   throws java.io.IOException
Begins reading text line-by-line

Starts with first non-short line, adds text until we get a blank line, returns text in-between. Lines are trimmed.

Throws:
java.io.IOException

filter

public static java.lang.String filter(java.lang.String in)
Coalesces whitespace, and ensures that it's only spaces and not any other type


getNextLongLine

public static java.lang.String getNextLongLine(java.io.BufferedReader br)
                                        throws java.io.IOException
Gets the next non-short line from a buffered reader. Trims it as well. Returns null if EOF.

Throws:
java.io.IOException


Copyright 2002-2004 Zachary DelProposto / jDip Development Team. All Rights Reserved.