All Packages Class Hierarchy This Package Previous Next Index
Class ORG.opengroup.misc.MLine
java.lang.Object
|
+----ORG.opengroup.misc.MLine
- public class MLine
- extends Object
- implements Enumeration
Processes a multi-line string.
Intended for use with the Manifest file of a jar, lines
may end with CR, LF, or CR LF. Line delimiters are preserved!
MLine(String)
- Analyze a multi-line string.
empty(String)
- An empty string is either zero length or begins with CR or LF.
getHeight()
- Returns the number of lines in the string.
getWidth()
- Returns the number of characters in the longest line.
hasMoreElements()
- Returns true if there is another line.
nextElement()
- Returns the next line.
MLine
public MLine(String multi)
- Analyze a multi-line string.
- Parameters:
- multi - The multi-line string or null.
empty
public static boolean empty(String s)
- An empty string is either zero length or begins with CR or LF.
getHeight
public int getHeight()
- Returns the number of lines in the string.
Returns 0 only if null was passed to the constructor.
Returns 1 only if there were no line feeds passed to the constructor.
getWidth
public int getWidth()
- Returns the number of characters in the longest line.
hasMoreElements
public boolean hasMoreElements()
- Returns true if there is another line.
nextElement
public Object nextElement()
- Returns the next line. (Cast to String.)
If there are no more lines, null is returned.
All Packages Class Hierarchy This Package Previous Next Index