128 lines
2.3 KiB
Plaintext
Executable File
128 lines
2.3 KiB
Plaintext
Executable File
package com.fp.dto.helper;
|
||
|
||
import java.io.Serializable;
|
||
|
||
/**
|
||
* Clase que se encarga del manejo de archivo como imagenes
|
||
*
|
||
* @author scastillo
|
||
*/
|
||
public class FileHelper implements Serializable {
|
||
/*
|
||
* Variable que contiene la extencion del archivo
|
||
*/
|
||
|
||
/**
|
||
* serialVersionUID
|
||
*/
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
private String extension;
|
||
|
||
/*
|
||
* Variable que contiene el archivo como tal
|
||
*/
|
||
private byte[] image;
|
||
|
||
/*
|
||
* Variable que contiene el nombre del archivo
|
||
*/
|
||
private String name;
|
||
|
||
/*
|
||
* Variable que contiene el tama<6D>o del archivo
|
||
*/
|
||
private Integer size;
|
||
|
||
private String contentType;
|
||
|
||
/**
|
||
* Entrega el valor de contentType
|
||
*
|
||
* @return Valor de contentType
|
||
*/
|
||
public String getContentType() {
|
||
return this.contentType;
|
||
}
|
||
|
||
/**
|
||
* Fija un nuevo valor en contentType
|
||
*
|
||
* @param pContentType nuevo valor para contentType
|
||
*/
|
||
public void setContentType(String pContentType) {
|
||
this.contentType = pContentType;
|
||
}
|
||
|
||
/**
|
||
* Metodo que devuelve la extencion del archivo
|
||
*
|
||
* @return
|
||
*/
|
||
public String getExtension() {
|
||
return this.extension;
|
||
}
|
||
|
||
/**
|
||
* Metodo que asigna la extencion del archivo
|
||
*
|
||
* @param extension
|
||
*/
|
||
public void setExtension(String extension) {
|
||
this.extension = extension;
|
||
}
|
||
|
||
/**
|
||
* Metodo que devuelve el archivo como tal
|
||
*
|
||
* @return
|
||
*/
|
||
public byte[] getImage() {
|
||
return this.image;
|
||
}
|
||
|
||
/**
|
||
* Metodo que asigna un archivo
|
||
*
|
||
* @param image
|
||
*/
|
||
public void setImage(byte[] image) {
|
||
this.image = image;
|
||
}
|
||
|
||
/**
|
||
* Metodo que devuelve el nombre del archivo
|
||
*
|
||
* @return
|
||
*/
|
||
public String getName() {
|
||
return this.name;
|
||
}
|
||
|
||
/**
|
||
* Metodo que asigna el nombre del archivo
|
||
*
|
||
* @param name
|
||
*/
|
||
public void setName(String name) {
|
||
this.name = name;
|
||
}
|
||
|
||
/**
|
||
* Metodo que devuelve el tamanio del archivo
|
||
*
|
||
* @return
|
||
*/
|
||
public Integer getSize() {
|
||
return this.size;
|
||
}
|
||
|
||
/*
|
||
* Metodo que asigna el tamanio del archivo
|
||
*/
|
||
|
||
public void setSize(Integer size) {
|
||
this.size = size;
|
||
}
|
||
}
|