private String noteToString(Repository repo,Note note) throws MissingObjectException, IOException, UnsupportedEncodingException {
  ObjectLoader loader=repo.open(note.getData());
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  loader.copyTo(baos);
  return new String(baos.toByteArray(),"UTF-8");
}

private String noteToString ( Repository repo , Note note ) throws MissingObjectException , IOException , UnsupportedEncodingException { ObjectLoader loader = repo . open ( note . getData ( ) ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; loader . copyTo ( baos ) ; return new String ( baos . toByteArray ( ) , "UTF-8" ) ; }
utility method that converts a note to a string ( assuming it ' s utf - 8 ) .
