29303132333435
@Action(value = "${id}", extension = EXT_PNG) public RawResultData viewPng() { byte[] bytes = imageCache.readImage(id + '.' + EXT_PNG); return new RawData(bytes, EXT_PNG_MIME); }
36373839404142
@Action(value = "${id}", extension = EXT_JPG) public RawResultData viewJpg() { byte[] bytes = imageCache.readImage(id + '.' + EXT_JPG); return new RawData(bytes, EXT_JPG_MIME); }
15161718192021
@Action public RawData view() { String result = "this is some raw direct result"; byte[] bytes = CharUtil.toAsciiByteArray(result.toCharArray()); return new RawData(bytes, MimeTypes.MIME_TEXT_HTML); }
18192021222324
}; @Action("/${:method}") public RawData madvocRawImage() { return new RawData(SMALLEST_GIF, MimeTypes.lookupMimeType("gif")); }