471,090 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

Problem with reading files and writing to a file without overwriting

I'm really new in java. I'm trying to read 8000 URL files and write to a file. It's a kind of combining all files together...not overwritten.
This is the URL of my all files http://www.ifi.unizh.ch/ddis/ph/2006/08/ ...
These files are .owl....and I store all of them in a directory. This is source code java that i wrote...it doesnt work as I want.... In fact, I just dont know how to call the files directly from the URL ... Please advice.

import java.io.*;
public class Test {

public static void main(String[] args) throws IOException {

// create two file references
File inputFile = new File("D:/ANALYSIS.owl");
File outputFile = new File("D:/ProcessHandbook0.owl");

// create two File Streams
FileReader in = new FileReader(inputFile);
FileWriter out = new FileWriter(outputFile);

// read one file and write it out to another
int c;

while ((c = in.read()) != -1)

// close both files
Oct 10 '07 #1
0 1589

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Brandon McCombs | last post: by
4 posts views Thread by Oliver Knoll | last post: by
7 posts views Thread by Kay | last post: by
11 posts views Thread by Abhishek | last post: by
6 posts views Thread by arne.muller | last post: by
5 posts views Thread by Neil Crighton | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.