Class RFResource
java.lang.Object
org.apache.derby.impl.store.raw.data.RFResource
- All Implemented Interfaces:
FileResource
-
Field Summary
FieldsFields inherited from interface FileResource
JAR_DIRECTORY_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongadd(String name, InputStream source) Add a file resource, copying from the input stream.Get the StorageFile for a file resource.charvoidRemove the current generation of a file resource from the database.voidDuring hard upgrade to <= 10.9, remove a jar directory (at post-commit time) from the database.longreplace(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: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:
-
removeJarDir
Description copied from interface:FileResourceDuring hard upgrade to <= 10.9, remove a jar directory (at post-commit time) from the database.- Specified by:
removeJarDirin interfaceFileResource- Parameters:
f-- Throws:
StandardException- if an error occurs- See Also:
-
remove
Description 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:
-
replace
public long replace(String name, long currentGenerationId, InputStream source) throws StandardException Description 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:
-
getAsFile
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:
-
getSeparatorChar
public char getSeparatorChar()- Specified by:
getSeparatorCharin interfaceFileResource- Returns:
- the separator character to be used in file names.
-