JAVA array

/* PHP CODE */
function AllLines($file_content)
{

$lines = explode("
", $file_content);

foreach($lines as $line)
{
if($line[0] !== " “)
{
$i++;
}
$allLines[$i] .= $line.”::";
}

return $main_and_sublines;

}

I want the same code in Java, any help?

Nice example: http://www.roseindia.net/java/beginners/java-read-file-line-by-line.shtml