public void writeTo(VirtualFile file) throws ServerException, ForbiddenException {
  file.updateContent(new ByteArrayInputStream(tree.getBytes()),null);
}

public void writeTo ( VirtualFile file ) throws ServerException , ForbiddenException { file . updateContent ( new ByteArrayInputStream ( tree . getBytes ( ) ) , null ) ; }
updates virtual file content
