Class RFResource
java.lang.Object
org.apache.derby.impl.store.raw.data.RFResource
- All Implemented Interfaces:
FileResource
-
Field Summary
FieldsFields inherited from interface org.apache.derby.iapi.store.access.FileResource
JAR_DIRECTORY_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
add
(String name, InputStream source) Add a file resource, copying from the input stream.Get the StorageFile for a file resource.char
void
Remove the current generation of a file resource from the database.void
During hard upgrade to <= 10.9, remove a jar directory (at post-commit time) from the database.long
replace
(String name, long currentGenerationId, InputStream source) Replace a file resource with a new version.
-
Field Details
-
factory
-
-
Constructor Details
-
RFResource
RFResource(BaseDataFileFactory dataFactory)
-
-
Method Details
-
add
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 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:
-
removeJarDir
Description copied from interface:FileResource
During hard upgrade to <= 10.9, remove a jar directory (at post-commit time) from the database.- Specified by:
removeJarDir
in interfaceFileResource
- Parameters:
f
-- Throws:
StandardException
- if an error occurs- See Also:
-
remove
Description copied from interface:FileResource
Remove the current generation of a file resource from the database.- Specified by:
remove
in interfaceFileResource
- Parameters:
name
- the name of the fileResource to remove.- Throws:
StandardException
- Oops- See Also:
-
replace
public long replace(String name, long currentGenerationId, 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 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:
-
getAsFile
Description copied from interface:FileResource
Get the StorageFile for a file resource.- Specified by:
getAsFile
in interfaceFileResource
- Parameters:
name
- The name of the fileResourcegenerationId
- the generationId of the fileResource- Returns:
- A StorageFile object representing the file.
- See Also:
-
getSeparatorChar
public char getSeparatorChar()- Specified by:
getSeparatorChar
in interfaceFileResource
- Returns:
- the separator character to be used in file names.
-