org.pentaho.platform.api.repository
Interface IContentItemFile

All Known Implementing Classes:
ContentItemFile

public interface IContentItemFile

There is no access to this class outside of this package.


Method Summary
 long copyToFile(String newFileName)
          Copies the latest file to another location
 boolean deleteOsFile()
          Deletes the file in the Operating System
 String getActionName()
           
 Date getFileDateTime()
           
 long getFileSize()
           
 String getId()
           
 InputStream getInputStream()
           
 String getOsFileName()
           
 String getOsPath()
           
 OutputStream getOutputStream(boolean overWriteOk)
           
 OutputStream getOutputStream(boolean overWriteOk, boolean append)
           
 Reader getReader()
           
 

Method Detail

getOsFileName

String getOsFileName()
Returns:
The file name on disk.

getOsPath

String getOsPath()
Returns:
The path to the file on disk

getActionName

String getActionName()
Returns:
The action name that created this file

getId

String getId()
Returns:
The Id of this file

getFileSize

long getFileSize()
Returns:
The file size

getFileDateTime

Date getFileDateTime()
Returns:
The file date/time

getInputStream

InputStream getInputStream()
                           throws ContentException
Returns:
An input stream from the file on disk
Throws:
ContentException

getReader

Reader getReader()
                 throws ContentException
Returns:
A Reader from the file on disk.
Throws:
ContentException

getOutputStream

OutputStream getOutputStream(boolean overWriteOk)
                             throws ContentException
Parameters:
overWriteOk - Indicates whether overwriting the file on disk is ok. (determined by the write mode of the containing ContentItem).
Returns:
An OutputStream to write to
Throws:
ContentException

getOutputStream

OutputStream getOutputStream(boolean overWriteOk,
                             boolean append)
                             throws ContentException
Parameters:
overWriteOk - Indicates whether overwriting the file on disk is ok. (determined by the write mode of the containing ContentItem).
append - Indicates whether to append to the file.
Returns:
An OutputStream to write to
Throws:
ContentException

copyToFile

long copyToFile(String newFileName)
                throws ContentException
Copies the latest file to another location

Parameters:
newFileName - File name to copy to. Must be fully qualified.
Returns:
Number of bytes copied
Throws:
ContentException

deleteOsFile

boolean deleteOsFile()
Deletes the file in the Operating System

Returns:
Success indicator