Class RFResource
- java.lang.Object
-
- org.apache.derby.impl.store.raw.data.RFResource
-
- All Implemented Interfaces:
FileResource
class RFResource extends java.lang.Object implements FileResource
-
-
Field Summary
Fields Modifier and Type Field Description private BaseDataFileFactoryfactory-
Fields inherited from interface org.apache.derby.iapi.store.access.FileResource
JAR_DIRECTORY_NAME
-
-
Constructor Summary
Constructors Constructor Description RFResource(BaseDataFileFactory dataFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longadd(java.lang.String name, java.io.InputStream source)Add a file resource, copying from the input stream.StorageFilegetAsFile(java.lang.String name, long generationId)Get the StorageFile for a file resource.chargetSeparatorChar()voidremove(java.lang.String name, long currentGenerationId)Remove the current generation of a file resource from the database.voidremoveJarDir(java.lang.String f)During hard upgrade to <= 10.9, remove a jar directory (at post-commit time) from the database.longreplace(java.lang.String name, long currentGenerationId, java.io.InputStream source)Replace a file resource with a new version.
-
-
-
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 StandardExceptionDescription copied from interface:FileResourceAdd a file resource, copying from the input stream. The InputStream will be closed by this method.- Specified by:
addin interfaceFileResource- 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)
-
removeJarDir
public void removeJarDir(java.lang.String f) throws StandardExceptionDescription copied from interface:FileResourceDuring hard upgrade to <= 10.9, remove a jar directory (at post-commit time) from the database.- Specified by:
removeJarDirin interfaceFileResource- Throws:
StandardException- if an error occurs- See Also:
FileResource.removeJarDir(java.lang.String)
-
remove
public void remove(java.lang.String name, long currentGenerationId) throws StandardExceptionDescription copied from interface:FileResourceRemove the current generation of a file resource from the database.- Specified by:
removein interfaceFileResource- 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 StandardExceptionDescription copied from interface:FileResourceReplace a file resource with a new version.The InputStream will be closed by this method.
- Specified by:
replacein interfaceFileResource- 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:FileResourceGet the StorageFile for a file resource.- Specified by:
getAsFilein interfaceFileResource- Parameters:
name- The name of the fileResourcegenerationId- 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:
getSeparatorCharin interfaceFileResource- Returns:
- the separator character to be used in file names.
-
-