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!


Constructor Index

 o MLine(String)
Analyze a multi-line string.

Method Index

 o empty(String)
An empty string is either zero length or begins with CR or LF.
 o getHeight()
Returns the number of lines in the string.
 o getWidth()
Returns the number of characters in the longest line.
 o hasMoreElements()
Returns true if there is another line.
 o nextElement()
Returns the next line.

Constructors

 o MLine
public MLine(String multi)
Analyze a multi-line string.

Parameters:
multi - The multi-line string or null.

Methods

 o empty
public static boolean empty(String s)
An empty string is either zero length or begins with CR or LF.

 o 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.

 o getWidth
public int getWidth()
Returns the number of characters in the longest line.

 o hasMoreElements
public boolean hasMoreElements()
Returns true if there is another line.

 o 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