- Joined
- Feb 11, 2011
- Messages
- 220
- Reaction score
- 5
- Trophies
- 0
- Location
- Colorado Springs
- XP
- 242
- Country

So, my first project is almost ready to ship, but I still have one last problem. Whenever I download a file, it limits the size to 10KB, from any URL. I've checked the URL, checked the file, reuploaded, but JAVA refuses to download more than 10KBs. Standby for Code:
What needs fixing?
Code:
/** Author: BloodWolfJW
* Project: ROMBox Lite v0.0.1
**/
import java.util.Scanner;
import java.net.*;
import java.io.*;
public class ROMBox_Lite {
public static void main(String[] args) {
Scanner ROM = new Scanner (System.in);
String Username;
Username = System.getProperty ("user.name");
System.out.print ("Hello! Welcome to ROMBox Lite. Please Enter the Desired ROM to Download: ");
String ROMBox = ROM.nextLine();
System.out.println ("");
System.out.print ("Now, Please Enter the Desired Name of the File: ");
String Filename = ROM.nextLine();
System.out.println ("");
try
{
System.out.print ("Connecting to the ROMBox Server...\n \n");
URL ROMDownload = new URL("http://www.fileden.com/files/2011/10/9/3206639/ROMs/" + ROMBox + ".zip");
ROMDownload.openConnection();
InputStream reader = ROMDownload.openStream();
System.out.print ("Connected! Downloading File...\n \n");
FileOutputStream writer = new FileOutputStream("C:/Users/" + Username + "/Downloads/" + Filename + ".zip");
byte[] buffer = new byte[153600];
int bytesRead = 0;
while ((bytesRead = reader.read(buffer)) > 0)
{writer.write(buffer, 0, bytesRead);}
System.out.print ("Done! Please Enjoy Your Downloaded File!");}
catch (MalformedURLException e){}
catch (IOException e){}
}
}
What needs fixing?







