Here is my sample code.
public File getFile(----)
{
File file=null;
try {
Class.forName(driver);
Connection conn = DriverManager.getConnection(url, username, pass);
System.out.println("Connected to EBS");
//String sql = "SELECT * FROM ebswo where woid='"+origURL+"'";
String sql = "SELECT * FROM ebswo where woid='wso002'";
Statement stmt = conn.prepareStatement(sql);
ResultSet rs = stmt.executeQuery(sql);
System.out.println();
while (rs.next()) {
docName = rs.getString(2);
System.out.println("Document Name in buildDocInfo>>>>>" + docName);
file = new File(docName);
Reader reader = rs.getCharacterStream(3);
FileWriter writer = new FileWriter(file);
char[] buffer = new char[1];
while (reader.read(buffer) > 0) {
writer.write(buffer);
}
System.out.println("File Created in buildDocInfo>>>>");
writer.close();
}
conn.close();
}
return file;
}
So my requirement is how can I get one instance of the file without storing the file in the local hard disk.
i.e I have to pass the file file instance dynamically with out storing the parent file into local drive.
please reply me soon..
Thanks In advance
Srinibash