com.ibm.ram.client
Class LocalFileArtifact
java.lang.Object
com.ibm.ram.common.data.Artifact
com.ibm.ram.client.RAMArtifact
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
|
Method Summary |
java.io.InputStream |
getContents()
Returns the files content as an input stream
TODO should we use an InputStreamInformation object here |
InputStreamInformation |
getContents(boolean infoOnly)
Get the contents |
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 |
downloadContentInformation, downloadContents, getAsset, getLabel, getMimeType, getName, getPath, getReference, getType, setAsset, setCreationDate, setLabel, setMimeType, setName, setPath, setReference, setSize, setType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LocalFileArtifact
public LocalFileArtifact(java.io.File file)
- Parameters:
asset - A asset to the repository this asset lived in.- Since:
- 7.1
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
getContents
public InputStreamInformation getContents(boolean infoOnly)
- Get the contents
- Parameters:
infoOnly - true return just the information, false return the InputStream too.
- Returns:
- the information.
- Since:
- 7.5.1.2
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