ch.software_atelier.simpleflex.docs.impl.ByteDoc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleflex-base Show documentation
Show all versions of simpleflex-base Show documentation
Build Micro Services with pico footprint
package ch.software_atelier.simpleflex.docs.impl;
import ch.software_atelier.simpleflex.docs.WebDoc;
import java.io.InputStream;
/**
* This is a simple WebDoc-Class for sending a byte-Array.
* It is a document-container-class that holds your generated data.
*/
public class ByteDoc extends WebDoc{
private final byte[] _data;
private final String _mime;
private final String _name;
/**
* @param data The data, that must be sent
* @param name The Name of the file
* @param mime The mimeType of the File
*/
public ByteDoc(byte[] data, String name, String mime){
_data = new byte[data.length];
for (int i=0;i