/** * Sets the URL to the resource. * @param url the URL * @param type the content type (e.g. "JPEG image") */ public void setUrl(String url, T type) { this.url = url; this.data = null; setContentType(type); }
/** * Sets the binary data of the resource. * @param data the binary data * @param type the content type (e.g. "JPEG image") */ public void setData(byte[] data, T type) { this.url = null; this.data = data; setContentType(type); }