|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ados.hestia.utils.io.FileStore
public class FileStore
This realize IStore interface using file to store data.
Field Summary | |
---|---|
protected static DateFormat |
gFormat
|
protected static long |
gIndex
|
protected File |
m_file
|
protected String |
m_id
|
protected String |
m_repositoryID
|
protected boolean |
m_temporary
|
Constructor Summary | |
---|---|
FileStore(File folder,
String repoID,
String id,
boolean temporary)
Construct. |
Method Summary | |
---|---|
OutputStream |
createStream()
Create output stream to write data. |
protected void |
finalize()
|
protected void |
generateFileName(File folder)
Generate name of corresponded file using store repository. |
File |
getFile()
Returns file with content for this store. |
String |
getID()
Returns id of store. |
String |
getRepositoryID()
Return owner repository identification. |
long |
getSize()
Returns size of data at store. |
int |
hashCode()
|
InputStream |
openSharedStream()
Open shared stream to read data. |
InputStream |
openStream()
Open ordinary stream to read data. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static long gIndex
protected static DateFormat gFormat
protected File m_file
protected String m_id
protected String m_repositoryID
protected boolean m_temporary
Constructor Detail |
---|
public FileStore(File folder, String repoID, String id, boolean temporary)
folder.
- Base folder where this Store will be exist.repoID
- id of owner repository.id
- store identification across repository.temporary
- indicate temporary or persistent this object.Method Detail |
---|
protected void generateFileName(File folder)
folder
- where FileStore must be allocated.public InputStream openStream() throws IOException
openStream
in interface IStore
IOException
- if stream can not be openedpublic InputStream openSharedStream() throws IOException
openSharedStream
in interface IStore
IOException
- if stream can not be openedpublic OutputStream createStream() throws IOException
createStream
in interface IStore
IOException
- if stream can not be openedpublic long getSize()
getSize
in interface IStore
public String getID()
getID
in interface IStore
public String getRepositoryID()
public File getFile()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |