public static TextAnnotation deserializeTextAnnotationFromFile(String fileName) throws IOException {
  File file=new File(fileName);
  if (!file.exists())   throw new IOException("ERROR: " + NAME + ".deserializeTextAnnotationFromFile(): file '"+ fileName+ "' does not exist.");
  return deserializeTextAnnotationFromBytes(FileUtils.readFileToByteArray(file));
}

public static TextAnnotation deserializeTextAnnotationFromFile ( String fileName ) throws IOException { File file = new File ( fileName ) ; if ( ! file . exists ( ) ) throw new IOException ( "ERROR: " + NAME + ".deserializeTextAnnotationFromFile(): file '" + fileName + "' does not exist." ) ; return deserializeTextAnnotationFromBytes ( FileUtils . readFileToByteArray ( file ) ) ; }
read serialized record from file and deserialize it . expects thrift serialization format , one record in a single file .
