public final class FileDto
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FileDto.FileType
Classifies a file type
|
Constructor and Description |
---|
FileDto(java.lang.String filename,
FileDto.FileType fileType,
byte[] bytes)
Creates a new file data transfer object
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
byte[] |
getBytes() |
java.lang.String |
getFilename() |
FileDto.FileType |
getFileType() |
static FileDto.FileType |
getFileType(java.lang.String filename)
Returns a
FileDto.FileType based on the passed in filename's extension |
int |
hashCode() |
java.lang.String |
toString() |
public FileDto(java.lang.String filename, FileDto.FileType fileType, byte[] bytes)
filename
- the filename; may not be nullfileType
- the file type; may not be nullbytes
- the actual binary data of the filejava.lang.NullPointerException
- if filename
or fileType
was nullpublic java.lang.String getFilename()
public FileDto.FileType getFileType()
public static FileDto.FileType getFileType(java.lang.String filename)
FileDto.FileType
based on the passed in filename's extensionfilename
- the filename; may not be null;IMAGE_OR_TEXTURE
by defaultjava.lang.NullPointerException
- if filename was nullpublic byte[] getBytes()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object