SmartFrog 3.10.000

org.smartfrog.services.filesystem.filestore
Interface FileEntry

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
FileEntryImpl

public interface FileEntry
extends java.rmi.Remote


Method Summary
 void append(byte[] content)
          Append data to the file.
 boolean exists()
          Test for a file existing.
 java.io.File getFile()
          Get File
 java.lang.Object getMetadata()
          Get metadata
 java.lang.String getMimetype()
          Get MIME type
 java.net.URI getUri()
          Get URI
 java.lang.Object lookupMetadata(java.lang.String key)
          Look up a piece of metadata
 void setMetadata(java.lang.Object metadata)
          Set metadata
 void setMimetype(java.lang.String mimetype)
          Set MIME type
 

Method Detail

getFile

java.io.File getFile()
                     throws java.rmi.RemoteException
Get File

Returns:
File
Throws:
java.rmi.RemoteException - In case of network/rmi error

getUri

java.net.URI getUri()
                    throws java.rmi.RemoteException
Get URI

Returns:
URI
Throws:
java.rmi.RemoteException - In case of network/rmi error

getMimetype

java.lang.String getMimetype()
                             throws java.rmi.RemoteException
Get MIME type

Returns:
String
Throws:
java.rmi.RemoteException - In case of network/rmi error

setMimetype

void setMimetype(java.lang.String mimetype)
                 throws java.rmi.RemoteException
Set MIME type

Parameters:
mimetype - String
Throws:
java.rmi.RemoteException - In case of network/rmi error

getMetadata

java.lang.Object getMetadata()
                             throws java.rmi.RemoteException
Get metadata

Returns:
Object
Throws:
java.rmi.RemoteException - In case of network/rmi error

setMetadata

void setMetadata(java.lang.Object metadata)
                 throws java.rmi.RemoteException
Set metadata

Parameters:
metadata - Object
Throws:
java.rmi.RemoteException - In case of network/rmi error

append

void append(byte[] content)
            throws java.rmi.RemoteException,
                   java.io.IOException
Append data to the file. After the write the buffer is flushed and the file is unlocked.

To do an atomic update, write everything in one go. To do a less-effient but potentially less costly-over-the-wire update, write in a few large blocks.

There is no equivalent operation to get the content back.

Parameters:
content - byte array of content
Throws:
java.rmi.RemoteException - if something went wrong over the wire
java.io.IOException - if something went wrong saving the content

exists

boolean exists()
               throws java.rmi.RemoteException
Test for a file existing.

Returns:
boolean
Throws:
java.rmi.RemoteException - In case of network/rmi error

lookupMetadata

java.lang.Object lookupMetadata(java.lang.String key)
                                throws java.rmi.RemoteException
Look up a piece of metadata

Parameters:
key - String to lookup
Returns:
the object stored under there
Throws:
java.rmi.RemoteException - In case of network/rmi error

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP