@Service
@Transac.Readonly
public InputStream smiley(int id) throws Exception
{
Smiley s = data.criteria(Smiley.class).add(Restrictions.idEq(id)).add(
Restrictions.eq("in.id", sess.me)).uniqueResult();
if (s == null)
throw err("smiley not found");
respType = String2.maskEmpty(s.type, "image");
return s.image.getBinaryStream();