org.openmobileis.synchro.openmsp.server.util
Class FileStoredOpenMISFile

java.lang.Object
  extended byorg.openmobileis.synchro.openmsp.server.util.FileStoredOpenMISFile
All Implemented Interfaces:
OpenMISFile, OpenMISSerializable, java.io.Serializable
Direct Known Subclasses:
FileStoreZipEntryFile

public class FileStoredOpenMISFile
extends java.lang.Object
implements OpenMISFile

Title: OpenMobileIS project source
Description: memory file

Since:
JDK 1.1
Version:
1.0.
Author:
Philippe Delrieu
See Also:
Serialized Form

Field Summary
protected  boolean copy
           
protected  long filedate
           
protected  java.lang.String fileName
           
protected  java.lang.String filePath
          file path.
protected  java.io.InputStream inputstream
           
static java.lang.String tempDir
           
protected  java.lang.String tempFileName
           
 
Constructor Summary
protected FileStoredOpenMISFile()
           
protected FileStoredOpenMISFile(java.io.InputStream data)
          specified data stream is close during reading.
  FileStoredOpenMISFile(java.lang.String completeName, java.io.InputStream data)
          specified data stream is close during reading.
  FileStoredOpenMISFile(java.lang.String filepath, java.lang.String filename)
           
  FileStoredOpenMISFile(java.lang.String name, java.lang.String path, java.io.InputStream data)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getFileCompleteName()
          return the complete file name of the file (ie: path+separator+name)
 byte[] getFileData()
          return file data as a byte array
 java.io.InputStream getFileDataStream()
          return file data as a stream
 long getFileDate()
          return file last modification date
 long getFileLength()
          return the file data length
 java.lang.String getFileName()
          return the name of the file.
 java.lang.String getFilePath()
          return the path of the file without the file name.
 int hashCode()
           
 void removeTempFile()
           
 void setFileDate(java.util.Date date)
          set file last modification date
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tempDir

public static final java.lang.String tempDir
See Also:
Constant Field Values

fileName

protected java.lang.String fileName

copy

protected boolean copy

inputstream

protected java.io.InputStream inputstream

filePath

protected java.lang.String filePath
file path. End with path separator


tempFileName

protected java.lang.String tempFileName

filedate

protected long filedate
Constructor Detail

FileStoredOpenMISFile

protected FileStoredOpenMISFile()

FileStoredOpenMISFile

protected FileStoredOpenMISFile(java.io.InputStream data)
                         throws java.io.IOException
specified data stream is close during reading.

Parameters:
data -
Throws:
java.io.IOException

FileStoredOpenMISFile

public FileStoredOpenMISFile(java.lang.String completeName,
                             java.io.InputStream data)
                      throws java.io.IOException
specified data stream is close during reading.

Parameters:
completeName -
data -
Throws:
java.io.IOException

FileStoredOpenMISFile

public FileStoredOpenMISFile(java.lang.String filepath,
                             java.lang.String filename)
                      throws java.io.IOException

FileStoredOpenMISFile

public FileStoredOpenMISFile(java.lang.String name,
                             java.lang.String path,
                             java.io.InputStream data)
                      throws java.io.IOException
Method Detail

getFileName

public java.lang.String getFileName()
return the name of the file. The name doesnot contain file path.

Specified by:
getFileName in interface OpenMISFile

getFileDataStream

public java.io.InputStream getFileDataStream()
                                      throws java.io.IOException
return file data as a stream

Specified by:
getFileDataStream in interface OpenMISFile
Throws:
java.io.IOException

getFilePath

public java.lang.String getFilePath()
return the path of the file without the file name. The path end with system separator.

Specified by:
getFilePath in interface OpenMISFile

getFileDate

public long getFileDate()
Description copied from interface: OpenMISFile
return file last modification date

Specified by:
getFileDate in interface OpenMISFile

setFileDate

public void setFileDate(java.util.Date date)
Description copied from interface: OpenMISFile
set file last modification date

Specified by:
setFileDate in interface OpenMISFile

getFileCompleteName

public java.lang.String getFileCompleteName()
return the complete file name of the file (ie: path+separator+name)

Specified by:
getFileCompleteName in interface OpenMISFile

getFileLength

public long getFileLength()
return the file data length

Specified by:
getFileLength in interface OpenMISFile

getFileData

public byte[] getFileData()
                   throws java.io.IOException
return file data as a byte array

Specified by:
getFileData in interface OpenMISFile
Throws:
java.io.IOException

removeTempFile

public void removeTempFile()
                    throws java.io.IOException
Throws:
java.io.IOException

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)


Copyright 2006 OpenMobileIS. All Rights Reserved.