
com.adobe.forms.common.service.FileAttachmentWrapper Maven / Gradle / Ivy
/*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2014 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by all applicable intellectual property
* laws, including trade secret and copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
*/
package com.adobe.forms.common.service;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
/**
* @pad.exclude Exclude from Published API.
*/
public class FileAttachmentWrapper {
/**
* Universal unique identifier for file attachment
*/
private String uuid;
private String fileName;
private String contentType;
private byte[] bytes;
public FileAttachmentWrapper(String fileName, String contentType, byte[] bytes){
this.fileName = fileName;
this.contentType = contentType;
this.bytes = bytes; // this isn't a security issue, these bytes are never exposed directly
}
public String getFileName() {
return fileName;
}
public String getContentType() {
return contentType;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public InputStream getInputStream() {
return new ByteArrayInputStream(bytes);
}
public byte[] getValue() {
return bytes;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy