public String read ( String filename ) throws IOException { Path p = new Path ( filename ) ; int size = ( int ) getMfs ( ) . getFileStatus ( p ) . getLen ( ) ; FSDataInputStream is = getMfs ( ) . open ( p ) ; byte [ ] content = new byte [ size ] ; is . readFully ( content ) ; return new String ( content ) ; }
Fully reads the content of the given file .