Package jodd.madvoc.result

Examples of jodd.madvoc.result.RawData


  @Action(value = "${id}", extension = EXT_PNG)
  public RawResultData viewPng() {
    byte[] bytes = imageCache.readImage(id + '.' + EXT_PNG);

    return new RawData(bytes, EXT_PNG_MIME);
  }
View Full Code Here


  @Action(value = "${id}", extension = EXT_JPG)
  public RawResultData viewJpg() {
    byte[] bytes = imageCache.readImage(id + '.' + EXT_JPG);

    return new RawData(bytes, EXT_JPG_MIME);
  }
View Full Code Here

  @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);
  }
View Full Code Here

  };


  @Action("/${:method}")
  public RawData madvocRawImage() {
    return new RawData(SMALLEST_GIF, MimeTypes.lookupMimeType("gif"));
  }
View Full Code Here

TOP

Related Classes of jodd.madvoc.result.RawData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.