io.gravitee.management.model.MediaEntity Maven / Gradle / Ivy
/**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.gravitee.management.model;
import java.io.InputStream;
import java.util.Date;
/**
* @author Guillaume GILLON
*/
public class MediaEntity {
private String type;
private String subType;
private String fileName;
private Date createAt;
private long size;
private InputStream data;
public MediaEntity(InputStream data, String type, String subType, String fileName, long size) {
this.type = type;
this.subType = subType;
this.fileName = fileName;
this.size = size;
this.data = data;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getSubType() {
return subType;
}
public void setSubType(String subType) {
this.subType = type;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Date getCreateAt() {
return createAt;
}
public void setUploadDate(Date createAt) {
this.createAt = createAt;
}
public long getSize() {
return size;
}
public void setSize(long size) {
this.size = size;
}
public InputStream getData() {
return data;
}
public void setData(InputStream data) {
this.data = data;
}
public String getMimeType() {
return this.type + '/' + this.subType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy