File Extraction using Java
I need help in writing a program which can download a database from pdb web and updates automatically, it should be able to extract that information that I need from the database.I need help in this. Thank you!
the current codes that i have are as follow:
Code:
/**
* @(#)lol.java
*
*
* @author
* @version 1.00 2010/4/26
*/
import java.io.*;
class FileRead
{
public static void main(String args[])
{
try{
// Open the file that is the first
// command line parameter
FileInputStream fstream = new FileInputStream("2RQV.pdb");
// Get the object of DataInputStream
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;//Read File Line By Line
while ((strLine = br.readLine()) != null)
{
System.out.println (strLine);// Print the content on the console
}
//Close the input stream
in.close();
}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
}