org.apache.derby.impl.store.raw.data
Class RFResource

java.lang.Object
  extended by org.apache.derby.impl.store.raw.data.RFResource
All Implemented Interfaces:
FileResource

 class RFResource
extends java.lang.Object
implements FileResource


Field Summary
private  BaseDataFileFactory factory
           
 
Fields inherited from interface org.apache.derby.iapi.store.access.FileResource
JAR_DIRECTORY_NAME
 
Constructor Summary
RFResource(BaseDataFileFactory dataFactory)
           
 
Method Summary
 long add(java.lang.String name, java.io.InputStream source)
          Add a file resource, copying from the input stream.
 StorageFile getAsFile(java.lang.String name, long generationId)
          Get the StorageFile for a file resource.
 char getSeparatorChar()
           
 void remove(java.lang.String name, long currentGenerationId)
          Remove the current generation of a file resource from the database.
 long replace(java.lang.String name, long currentGenerationId, java.io.InputStream source)
          Replace a file resource with a new version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

private final BaseDataFileFactory factory
Constructor Detail

RFResource

RFResource(BaseDataFileFactory dataFactory)
Method Detail

add

public long add(java.lang.String name,
                java.io.InputStream source)
         throws StandardException
Description copied from interface: FileResource
Add a file resource, copying from the input stream. The InputStream will be closed by this method.

Specified by:
add in interface FileResource
Parameters:
name - the name of the file resource.
source - an input stream for reading the content of the file resource.
Returns:
the generationId for the file resource. This quantity increases when you replace the file resource.
Throws:
StandardException - Oops
See Also:
FileResource.add(java.lang.String, java.io.InputStream)

remove

public void remove(java.lang.String name,
                   long currentGenerationId)
            throws StandardException
Description copied from interface: FileResource
Remove the current generation of a file resource from the database.

Specified by:
remove in interface FileResource
Parameters:
name - the name of the fileResource to remove.
Throws:
StandardException - Oops
See Also:
FileResource.remove(java.lang.String, long)

replace

public long replace(java.lang.String name,
                    long currentGenerationId,
                    java.io.InputStream source)
             throws StandardException
Description copied from interface: FileResource
Replace a file resource with a new version.

The InputStream will be closed by this method.

Specified by:
replace in interface FileResource
Parameters:
name - the name of the file resource.
source - an input stream for reading the content of the file resource.
Returns:
the generationId for the new 'current' version of the file resource.
Throws:
StandardException - Oops
See Also:
FileResource.replace(java.lang.String, long, java.io.InputStream)

getAsFile

public StorageFile getAsFile(java.lang.String name,
                             long generationId)
Description copied from interface: FileResource
Get the StorageFile for a file resource.

Specified by:
getAsFile in interface FileResource
Parameters:
name - The name of the fileResource
generationId - the generationId of the fileResource
Returns:
A StorageFile object representing the file.
See Also:
FileResource.getAsFile(java.lang.String, long)

getSeparatorChar

public char getSeparatorChar()
Specified by:
getSeparatorChar in interface FileResource
Returns:
the separator character to be used in file names.

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.