final FileReader in = new FileReader( src );
final long length = src.length();
if ( length > 1024 * 1024 * 1024 )
{
throw new IllegalArgumentException();
}
final char[] readBuffer = new char[ readBufferSize ];
final StringBuilder result = new StringBuilder( (int)length );
try
{
while ( true )
{
final int numRead = in.read( readBuffer, 0, readBufferSize );
if ( numRead < 0 )
break;
result.append( readBuffer, 0, numRead );
}
}
finally
{
in.close();
}
return( result.toString() );