public static String [ ] getAllFileContentAsArray ( String filename ) throws Exception {
  BufferedReader in = new BufferedReader ( new FileReader ( filename ) ) ;
  List < String > all = new ArrayList < String > ( ) ;
  String s = in . readLine ( ) ;
  while ( s != null ) {
    all . add ( s ) ;
    s = in . readLine ( ) ;
  }
  in . close ( ) ;
  return all . toArray ( new String [ 0 ] ) ;
}

public static String [ ] getAllFileContentAsArray ( String filename ) throws Exception { BufferedReader in = new BufferedReader ( new FileReader ( filename ) ) ; List < String > all = new ArrayList < String > ( ) ; String s = in . readLine ( ) ; while ( s != null ) { all . add ( s ) ; s = in . readLine ( ) ; } in . close ( ) ; return all . toArray ( new String [ 0 ] ) ; }
(method_declaration (modifiers) type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier))))))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_creation_expression type: (type_identifier) dimensions: (dimensions_expr (decimal_integer_literal))))))))