public class FileInfo extends XMLElem
<file> <name>d:\tmp\a.dll</name> <version>1.0.0.0.0</version> <size>1000</size> <modified>1234565667</modified> </file>
Constructor and Description |
---|
FileInfo(org.w3c.dom.Element elem)
Construct a 'FileInfo' object from the information contained in the
org.w3c.dom.Element object. |
FileInfo(java.lang.String name,
oracle.lite.web.ifs.OSFile file)
Construct a FileInfo object from a 'Oracle Lite File' object.
|
Modifier and Type | Method and Description |
---|---|
void |
copyTo(java.io.OutputStream out)
Copy data from the file to the
OutputStream |
boolean |
exists()
Check if the file actually exists in the file system.
|
oracle.lite.web.ifs.OSFile |
getFile()
Get the file as an
oracle.lite.web.ifs.OSFile object |
java.io.InputStream |
getInputStream()
Return an InputStream after skipping 'skip' bytes
|
java.lang.String |
getLastModified()
Get the time the file was last modified.
|
int |
getLength()
Return actual number of bytes after skipping 'skip' number
of bytes from the file.
|
byte[] |
getMetaData()
Return file meta data information as an array of bytes.
|
java.lang.String |
getName()
Get the name of the file
|
java.lang.String |
getSize()
Get the size of the file
|
int |
getTotalSize()
Return the total size of the file (File size + meta data size).
|
java.lang.String |
getVersion()
Get the version of the file
|
boolean |
isSame(FileDiff fd)
Check if the file has been modified or not using file size and file
modified time.
|
java.sql.Timestamp |
lastModified()
Get the time the file was last modified as java.sql.Timestamp.
|
void |
setActualName(java.lang.String name)
Set actual file name.
|
void |
setLastModified(java.lang.String mod)
Set a new last modified time.
|
void |
setSize(java.lang.String size)
Set a new file size.
|
getAttribute, getChildElement, getChildren, getChildText, getTagName, getText, getXMLText, load
public FileInfo(org.w3c.dom.Element elem) throws java.lang.Exception
org.w3c.dom.Element
object.elem
- org.w3c.dom.Element
objectjava.lang.Exception
public FileInfo(java.lang.String name, oracle.lite.web.ifs.OSFile file)
name
- File namefile
- oracle.lite.web.ifs.OSFile
object.public void copyTo(java.io.OutputStream out) throws java.io.IOException
OutputStream
out
- OutputStream
object.java.io.IOException
java.io.IOException
public boolean exists()
public oracle.lite.web.ifs.OSFile getFile()
oracle.lite.web.ifs.OSFile
objectoracle.lite.web.ifs.OSFile
objectpublic java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public java.lang.String getLastModified()
public int getLength()
public byte[] getMetaData()
public java.lang.String getName()
public java.lang.String getSize()
public int getTotalSize()
public java.lang.String getVersion()
public boolean isSame(FileDiff fd)
fd
- oracle.lite.dm.FileDiff
public java.sql.Timestamp lastModified()
public void setActualName(java.lang.String name)
name
- Actual filenamepublic void setLastModified(java.lang.String mod)
mod
- new modified timepublic void setSize(java.lang.String size)
size
- New file size