- /**
- * Sets the encoded image data. The encoded image data can only be set once
- * and it must not be {@code null}.
- *
- * @param imageData
- * The encoded image data
- * @return This temporary image
- */
- public TemporaryImage setImageData(byte[] imageData) {
- checkNotNull(imageData, "imageData must not be null");
- checkState(this.imageData == null, "image data must not already be set");
- this.imageData = imageData;
- return this;