com.google.gdata.util.common.io
Interface LineProcessor<T>

Type Parameters:
T - the type of the result of processing the lines seen

public interface LineProcessor<T>

A callback to be used with the streaming readLines methods.

processLine(java.lang.String) will be called for each line that is read, and should return false when you want to stop processing.

See Also:
Characters.readLines(InputSupplier, LineProcessor), Files#readLines(java.io.File, java.nio.charset.Charset, LineProcessor), Resources#readLines(java.net.URL, java.nio.charset.Charset, LineProcessor)

Method Summary
 T getResult()
           
 boolean processLine(java.lang.String line)
          This method will be called once for each line.
 

Method Detail

processLine

boolean processLine(java.lang.String line)
                    throws java.io.IOException
This method will be called once for each line.

Returns:
true if we want to continue processing, false if we want to stop
Throws:
java.io.IOException

getResult

T getResult()
Returns:
the result of processing all of the lines seen