Package com.arcadedb.engine
Class ComponentFile
- java.lang.Object
-
- com.arcadedb.engine.ComponentFile
-
- Direct Known Subclasses:
PaginatedComponentFile
public class ComponentFile extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ComponentFile.MODE
-
Field Summary
Fields Modifier and Type Field Description protected String
componentName
protected String
fileExtension
protected int
fileId
protected String
fileName
protected String
filePath
protected ComponentFile.MODE
mode
protected boolean
open
protected File
osFile
protected int
version
-
Constructor Summary
Constructors Modifier Constructor Description ComponentFile()
protected
ComponentFile(String filePath, ComponentFile.MODE mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
calculateChecksum()
void
close()
void
drop()
String
getComponentName()
String
getFileExtension()
int
getFileId()
String
getFileName()
String
getFilePath()
File
getOSFile()
long
getSize()
int
getVersion()
boolean
isOpen()
protected void
open(String filePath, ComponentFile.MODE mode)
void
rename(String newFileName)
void
setFileId(int fileId)
String
toString()
-
-
-
Field Detail
-
mode
protected final ComponentFile.MODE mode
-
filePath
protected String filePath
-
fileName
protected String fileName
-
osFile
protected File osFile
-
fileId
protected int fileId
-
version
protected int version
-
componentName
protected String componentName
-
fileExtension
protected String fileExtension
-
open
protected boolean open
-
-
Constructor Detail
-
ComponentFile
public ComponentFile()
-
ComponentFile
protected ComponentFile(String filePath, ComponentFile.MODE mode) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
close
public void close()
-
getSize
public long getSize() throws IOException
- Throws:
IOException
-
open
protected void open(String filePath, ComponentFile.MODE mode) throws FileNotFoundException
- Throws:
FileNotFoundException
-
rename
public void rename(String newFileName) throws IOException
- Throws:
IOException
-
drop
public void drop() throws IOException
- Throws:
IOException
-
getFileName
public String getFileName()
-
isOpen
public boolean isOpen()
-
getFilePath
public String getFilePath()
-
getComponentName
public String getComponentName()
-
getFileExtension
public String getFileExtension()
-
getFileId
public int getFileId()
-
getOSFile
public File getOSFile()
-
setFileId
public void setFileId(int fileId)
-
getVersion
public int getVersion()
-
calculateChecksum
public long calculateChecksum() throws IOException
- Throws:
IOException
-
-