1 21 package com.jaspersoft.jasperserver.api.metadata.common.domain; 22 23 import java.io.ByteArrayInputStream ; 24 import java.io.InputStream ; 25 26 import com.jaspersoft.jasperserver.api.metadata.common.domain.util.StreamUtils; 27 28 32 public class FileResourceData { 33 private final byte[] data; 34 35 public FileResourceData(byte[] data) { 36 this.data = data; 37 } 38 39 public FileResourceData(InputStream is) { 40 this.data = StreamUtils.readData(is); 41 } 42 43 public byte[] getData() { 44 return data; 45 } 46 47 public InputStream getDataStream() { 48 return new ByteArrayInputStream (data); 49 } 50 } 51 | Popular Tags |