BrightSide Workbench Full Report + Source Code
org.turro.file.ImageFile Class Reference
Inheritance diagram for org.turro.file.ImageFile:
Collaboration diagram for org.turro.file.ImageFile:

Public Member Functions

 ImageFile (File file)
 
File getThumb ()
 
- Public Member Functions inherited from org.turro.file.FileWrapper
 FileWrapper (File file)
 
File getFile ()
 
String getBaseName ()
 
String getExtension ()
 
List< FileActiongetActions ()
 
FileAction getAction (String label)
 
Properties getProperties () throws FileNotFoundException, IOException
 
FileItem getFileItem ()
 
void setFileItem (FileItem fileItem)
 
void delete ()
 
void copyTo (File destination) throws IOException
 
void download ()
 
void upload (final Command command)
 
void uploadContent (final Command command)
 

Static Public Member Functions

static boolean isMyType (File file)
 
- Static Public Member Functions inherited from org.turro.file.FileWrapper
static FileWrapper getFileByType (File file)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.file.FileWrapper
File file
 
FileItem fileItem
 
PropertiesFile propertiesFile
 
List< FileActionactions
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 27 of file ImageFile.java.

Constructor & Destructor Documentation

◆ ImageFile()

org.turro.file.ImageFile.ImageFile ( File  file)

Definition at line 29 of file ImageFile.java.

29  {
30  super(file);
31  }

Member Function Documentation

◆ getThumb()

File org.turro.file.ImageFile.getThumb ( )

Definition at line 33 of file ImageFile.java.

33  {
34  File thumb = new File(
35  FileUtil.getParentPath(file.getAbsolutePath()) +
36  "/thumbs/" + FileUtil.getBaseName(file) + ".png"
37  );
38  if(thumb.exists()) {
39  return thumb;
40  }
41  return null;
42  }

◆ isMyType()

static boolean org.turro.file.ImageFile.isMyType ( File  file)
static

Definition at line 44 of file ImageFile.java.

44  {
45  String ext = FileUtil.getExtension(file);
46  return "gif".equalsIgnoreCase(ext) ||
47  "jpg".equalsIgnoreCase(ext) ||
48  "jpeg".equalsIgnoreCase(ext) ||
49  "png".equalsIgnoreCase(ext);
50  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: