@Get public Representation represent() throws Exception { // Wraps the StringRepresentation DigesterRepresentation result = new DigesterRepresentation( new StringRepresentation("hello, world")); result.exhaust(); // Compute representation's digest. result.setDigest(result.computeDigest()); return result; } }