|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinmuebles.util.FotoBlob
public class FotoBlob
----------------------------------------------------------------------------- Used to test the functionality of how to load and unload binary data from an Oracle BLOB. This example uses an Oracle table with the following definition: CREATE TABLE test_blob ( id NUMBER(15) , image_name VARCHAR2(1000) , image BLOB , timestamp DATE ); -----------------------------------------------------------------------------
Field Summary | |
---|---|
private java.sql.Connection |
conn
|
private java.lang.String |
dbPassword
|
private java.lang.String |
dbUser
|
private java.io.File |
inputBinaryFile
|
private java.lang.String |
inputBinaryFileName
|
private java.io.File |
outputBinaryFile1
|
private java.io.File |
outputBinaryFile2
|
private java.lang.String |
outputBinaryFileName1
|
private java.lang.String |
outputBinaryFileName2
|
Constructor Summary | |
---|---|
FotoBlob(java.lang.String[] args)
Default constructor used to create this object. |
Method Summary | |
---|---|
static boolean |
checkArguments(java.lang.String[] args)
Validate command-line arguments to this program. |
void |
closeOracleConnection()
Close Oracle database connection. |
void |
openOracleConnection()
Obtain a connection to the Oracle database. |
void |
readBLOBToFileGet()
Method used to write the contents (data) from an Oracle BLOB column to an O/S file. |
void |
readBLOBToFileStream()
Method used to write the contents (data) from an Oracle BLOB column to an O/S file. |
java.lang.String |
toString()
Override the Object toString method. |
static void |
usage()
Method used to print program usage to the console. |
void |
writeBLOBPut()
Method used to write binary data contained in a file to an Oracle BLOB column. |
void |
writeBLOBStream()
Method used to write binary data contained in a file to an Oracle BLOB column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String inputBinaryFileName
private java.io.File inputBinaryFile
private java.lang.String outputBinaryFileName1
private java.io.File outputBinaryFile1
private java.lang.String outputBinaryFileName2
private java.io.File outputBinaryFile2
private java.lang.String dbUser
private java.lang.String dbPassword
private java.sql.Connection conn
Constructor Detail |
---|
public FotoBlob(java.lang.String[] args) throws java.io.IOException
args
- Array of string arguments passed in from the command-line.
java.io.IOException
Method Detail |
---|
public void openOracleConnection() throws java.sql.SQLException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.ClassNotFoundException
java.sql.SQLException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.ClassNotFoundException
public void closeOracleConnection() throws java.sql.SQLException
java.sql.SQLException
public static void usage()
public static boolean checkArguments(java.lang.String[] args)
args
- Array of string arguments passed in from the command-line.
public java.lang.String toString()
toString
in class java.lang.Object
public void writeBLOBPut() throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
public void readBLOBToFileGet() throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
public void writeBLOBStream() throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
public void readBLOBToFileStream() throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |