Class LongObjectLoader
java.lang.Object
com.mcpdbwizard.pub.LongObjectLoader
This utility class is used to get LOB objects into and out of the
database.
Under normal circumstances MCPDBWizard users will have no reason to use this class directly - the generated code will use it.
Copyright 2003-2026 ATB Consultancy Services Ltd (formerly Orinda Software Ltd, Dublin, Ireland)
- Version:
- 7
- Author:
- [email protected]
-
Constructor Summary
ConstructorsConstructorDescriptionThis utility class is used to get LOB objects into and out of the database. -
Method Summary
Modifier and TypeMethodDescriptionstatic oracle.sql.BFILEAttempts to upload a File to a BFILE This always fails as BFILES are read only.static oracle.sql.BLOBloadBLOB(oracle.sql.BLOB newBLOB, byte[] theArray) Unloads a byte array to a BLOBstatic oracle.sql.BLOBLoads a File into a BLOBstatic oracle.sql.CLOBloadCLOB(oracle.sql.CLOB newCLOB, byte[] theArray) Loads a byte array into a CLOBstatic oracle.sql.CLOBloadCLOB(oracle.sql.CLOB newCLOB, char[] theArray) Loads a char array into a CLOBstatic oracle.sql.CLOBLoads a File into a CLOBvoidsetBufferSize(int bufferSize) Set buffer size for IO operationsvoidsetKeepFiles(boolean keepFiles) Sets flag used to determine whether we call the 'deleteOnExit' method for files we download.unloadBfile(File newFile, oracle.sql.BFILE tempBFILE) Unloads a BFILE column into a filebyte[]unloadBfileIntoByteArray(oracle.sql.BFILE tempBFILE) Unloads a BFILE column into a byte arrayunloadBinaryStream(File newFile, InputStream theInputStream, String columnDataType) Unloads a Binary Stream into a fileunloadBinaryStream(File newFile, String theInputString, String columnDataType) Unloads a LONG column into a filebyte[]unloadBinaryStreamIntoByteArray(InputStream theInputStream, String columnDataType) Unloads a Binary Stream into a byte array.unloadBlob(File newFile, oracle.sql.BLOB tempBLOB) Unloads a BLOB column into a filebyte[]unloadBlobIntoByteArray(oracle.sql.BLOB tempBLOB) Unloads a BLOB column into a byte arrayunloadClob(File newFile, oracle.sql.CLOB tempCLOB) Unloads a CLOB column into a filebyte[]unloadClobIntoByteArray(oracle.sql.CLOB tempCLOB) Unloads a CLOB column into a byte arraychar[]unloadClobIntoCharArray(Clob tempCLOB) Unloads a CLOB column into a char arraychar[]unloadClobIntoCharArray(oracle.sql.CLOB tempCLOB) Unloads a CLOB column into a char array
-
Constructor Details
-
LongObjectLoader
public LongObjectLoader()This utility class is used to get LOB objects into and out of the database.
-
-
Method Details
-
loadCLOB
public static oracle.sql.CLOB loadCLOB(oracle.sql.CLOB newCLOB, File theFile, int bufferSize) throws CSException Loads a File into a CLOB- Parameters:
theFile- File to read frombufferSize- IO Buffer size in bytes- Returns:
- oracle.sql.CLOB newCLOB CLOB to be updated
- Throws:
CSException
-
loadBLOB
public static oracle.sql.BLOB loadBLOB(oracle.sql.BLOB newBLOB, File theFile, int bufferSize) throws CSException Loads a File into a BLOB- Parameters:
newBLOB- BLOB to be updatedtheFile- The file to load into the BLOB- Returns:
- oracle.sql.BLOB newBLOB
- Throws:
CSException
-
loadCLOB
Loads a byte array into a CLOB- Parameters:
newCLOB- CLOB to be updatedtheArray- An array of bytes to load into the CLOB- Returns:
- oracle.sql.CLOB newCLOB
- Throws:
CSException
-
loadBLOB
Unloads a byte array to a BLOB- Parameters:
newBLOB- BLOB to be updatedtheArray- Array of bytes- Throws:
CSException
-
loadBFILE
public static oracle.sql.BFILE loadBFILE(oracle.sql.BFILE newBFILE, File theFile, int bufferSize) throws CSException Attempts to upload a File to a BFILE This always fails as BFILES are read only.- Parameters:
newBFILE- BFILE to be updatedtheFile- File to read frombufferSize- IO Buffer size in bytes- Throws:
CSException- Because BFILEs can not be modified
-
loadCLOB
Loads a char array into a CLOB- Parameters:
newCLOB- CLOB to be updatedtheArray- an array of chars- Returns:
- oracle.sql.CLOB newCLOB
- Throws:
CSException
-
setKeepFiles
public void setKeepFiles(boolean keepFiles) Sets flag used to determine whether we call the 'deleteOnExit' method for files we download. -
setBufferSize
public void setBufferSize(int bufferSize) Set buffer size for IO operations -
unloadBinaryStream
public File unloadBinaryStream(File newFile, InputStream theInputStream, String columnDataType) throws CSException Unloads a Binary Stream into a file- Parameters:
newFile- File to unload stream intotheInputStream- Input stream from databasecolumnDataType- Column database type- Throws:
CSException
-
unloadBinaryStreamIntoByteArray
public byte[] unloadBinaryStreamIntoByteArray(InputStream theInputStream, String columnDataType) throws CSException Unloads a Binary Stream into a byte array. This probably won't work for very big LOBS.- Parameters:
theInputStream- Input stream from databasecolumnDataType- Column database type- Returns:
- byte[] an array containing the contents of the binary stream.
- Throws:
CSException- Since:
- V5.0.2303
-
unloadBinaryStream
public File unloadBinaryStream(File newFile, String theInputString, String columnDataType) throws CSException Unloads a LONG column into a file- Parameters:
newFile- File to unload stream intotheInputString- long column from databasecolumnDataType- Column database type- Throws:
CSException
-
unloadBfile
Unloads a BFILE column into a file- Parameters:
newFile- File to unload stream intotempBFILE- BFILE to unload.- Throws:
CSException
-
unloadBlob
Unloads a BLOB column into a file- Parameters:
newFile- File to unload stream intotempBLOB- BLOB to unload.- Throws:
CSException
-
unloadClob
Unloads a CLOB column into a file- Parameters:
newFile- File to unload stream intotempCLOB- CLOB to unload.- Throws:
CSException
-
unloadBfileIntoByteArray
Unloads a BFILE column into a byte array- Parameters:
tempBFILE- BFILE to unload.- Returns:
- byte[] an array of zero or more bytes containing the BFILE
- Throws:
CSException- Since:
- V5.0.2303
-
unloadBlobIntoByteArray
Unloads a BLOB column into a byte array- Parameters:
tempBLOB- BLOB to unload.- Returns:
- byte[] an array of zero or more bytes containing the BFILE
- Throws:
CSException- Since:
- V5.0.2303
-
unloadClobIntoByteArray
Unloads a CLOB column into a byte array- Parameters:
tempCLOB- CLOB to unload.- Returns:
- byte[] an array of zero or more bytes containing the BFILE
- Throws:
CSException- Since:
- V5.0.2303
-
unloadClobIntoCharArray
Unloads a CLOB column into a char array- Parameters:
tempCLOB- CLOB to unload.- Returns:
- byte[] an array of zero or more bytes containing the CLOB
- Throws:
CSException- Since:
- V6.0.2765
-
unloadClobIntoCharArray
Unloads a CLOB column into a char array- Parameters:
tempCLOB- CLOB to unload.- Returns:
- byte[] an array of zero or more bytes containing the CLOB
- Throws:
CSException- Since:
- V6.0.2839
-