| java.lang.Object org.acm.seguin.metrics.LineCounter
LineCounter | public class LineCounter (Code) | | Counts the number of lines in a file
author: Chris Seguin |
LineCounter | public LineCounter(File init)(Code) | | Constructor for the LineCounter object
Parameters: init - File to count |
countCharacter | protected int countCharacter(int ch, InputStream in) throws IOException(Code) | | Counts how many lines a character counts as (depends on next character
sometimes)
Parameters: ch - The character to be counted Parameters: in - The input stream The number to add to the ongoing count exception: IOException - Thrown if unable to read from the input stream |
countLines | public int countLines()(Code) | | Counts the number of lines in a file
The number of lines in the file |
main | public static void main(String[] args)(Code) | | Main program
Parameters: args - Command line arguments |
printMessage | public int printMessage()(Code) | | Prints the message
The number of lines in the file |
|
|