All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tiogasolutions.notify.pub.attachment.AttachmentHolder Maven / Gradle / Ivy

There is a newer version: 5.1.4
Show newest version
package org.tiogasolutions.notify.pub.attachment;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * User: Harlan
 * Date: 2/7/2015
 * Time: 5:28 PM
 */
public class AttachmentHolder {
  private final String name;
  private final String contentType;
  private final byte[] content;

  public AttachmentHolder(String name, String contentType, byte[] content) {
    this.name = name;
    this.contentType = contentType;
    this.content = content;
  }

  public String getName() {
      return name;
  }

  public String getContentType() {
      return contentType;
  }

  public byte[] getContent() { return content;}

  public InputStream getInputStream() {
    return new ByteArrayInputStream(content);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy