com.ibm.ram.client
Class LocalFileArtifact

java.lang.Object
  extended by com.ibm.ram.common.data.Artifact
      extended by com.ibm.ram.client.RAMArtifact
          extended by com.ibm.ram.client.LocalFileArtifact

public class LocalFileArtifact
extends RAMArtifact

Represents the artifact of an asset that has its contents stored locally as a file.

Since:
7.1
Author:
kbauer

Field Summary
 
Fields inherited from class com.ibm.ram.common.data.Artifact
FILE_DELIM, TYPE_FILE, TYPE_FOLDER, TYPE_URL
 
Constructor Summary
LocalFileArtifact(java.io.File file)
           
 
Method Summary
 java.io.InputStream getContents()
          Returns the files content as an input stream TODO should we use an InputStreamInformation object here
 long getCreationDate()
           
 java.io.File getFile()
          Return the underlying File object
 long getSize()
          The size of the artifact.
 
Methods inherited from class com.ibm.ram.client.RAMArtifact
downloadContents, getAsset, getLabel, getMimeType, getName, getPath, getReference, getType, setAsset, setCreationDate, setLabel, setMimeType, setName, setPath, setReference, setSize, setType
 
Methods inherited from class com.ibm.ram.common.data.Artifact
getChecksum, setChecksum, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalFileArtifact

public LocalFileArtifact(java.io.File file)
Parameters:
asset - A asset to the repository this asset lived in.
Since:
7.1
Method Detail

getContents

public java.io.InputStream getContents()
                                throws RAMRuntimeException
Returns the files content as an input stream TODO should we use an InputStreamInformation object here

Returns:
Throws:
RAMRuntimeException
Since:
7.1

getFile

public java.io.File getFile()
Return the underlying File object

Since:
7.1

getCreationDate

public long getCreationDate()
Overrides:
getCreationDate in class RAMArtifact
Returns:
Returns the creationDate.

getSize

public long getSize()
Description copied from class: Artifact
The size of the artifact.

Overrides:
getSize in class RAMArtifact