helma.doc
Class Util

java.lang.Object
  extended by helma.doc.Util

public final class Util
extends java.lang.Object


Constructor Summary
Util()
           
 
Method Summary
static java.lang.String chopComment(java.lang.String comment)
          chops anything that comes after a closing comment tag
static java.lang.String chopDelimiters(java.lang.String line)
          chops a string from comment-delimiters
static void debugLineFromFile(java.io.File sourceFile, java.awt.Point p, java.lang.String debugStr)
          method to debug file/stream-handling with Point objects. extracts the line p points to and prints it with a pointer to the given column
static java.lang.String extractString(java.lang.String[] lines, int start, int end)
          Extract a part of a file defined by two points from a String array
static java.lang.String extractString(java.lang.String[] lines, java.awt.Point start, java.awt.Point end)
          Extract a part of a file defined by two points from a String array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

chopDelimiters

public static java.lang.String chopDelimiters(java.lang.String line)
chops a string from comment-delimiters

Parameters:
line - a line of raw text
Returns:
chopped string

chopComment

public static java.lang.String chopComment(java.lang.String comment)
chops anything that comes after a closing comment tag

Parameters:
comment - the raw comment
Returns:
chopped comment

extractString

public static java.lang.String extractString(java.lang.String[] lines,
                                             java.awt.Point start,
                                             java.awt.Point end)
Extract a part of a file defined by two points from a String array

Parameters:
lines - an array of lines
start - of string to extract defined by column x and row y
end - of string to extract
Returns:
string

extractString

public static java.lang.String extractString(java.lang.String[] lines,
                                             int start,
                                             int end)
Extract a part of a file defined by two points from a String array

Parameters:
lines - an array of lines
start - of string to extract defined by column x and row y
end - of string to extract
Returns:
string

debugLineFromFile

public static void debugLineFromFile(java.io.File sourceFile,
                                     java.awt.Point p,
                                     java.lang.String debugStr)
method to debug file/stream-handling with Point objects. extracts the line p points to and prints it with a pointer to the given column

Parameters:
sourceFile -
p - x-value is used for column, y for row
debugStr - string prefixed to output


Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.