document -> StringBuffer