Click here to Skip to main content
15,892,768 members
Home / Discussions / Java
   

Java

 
Questioncode IN JAVA HELP Pin
fresh2g624-Jan-09 8:01
fresh2g624-Jan-09 8:01 
AnswerRe: code IN JAVA HELP Pin
Reagan Conservative29-Jan-09 11:30
Reagan Conservative29-Jan-09 11:30 
Questionnetbeans Pin
tksrules22-Jan-09 22:47
tksrules22-Jan-09 22:47 
QuestionJava questions Pin
tksrules22-Jan-09 22:46
tksrules22-Jan-09 22:46 
AnswerRe: Java questions Pin
Reagan Conservative29-Jan-09 11:42
Reagan Conservative29-Jan-09 11:42 
QuestionSending a newletter as an Email [modified] Pin
peaceful_warrior20-Jan-09 18:45
peaceful_warrior20-Jan-09 18:45 
AnswerRe: Sending a newletter as an Email Pin
Swapnil Gholap27-Jan-09 22:09
Swapnil Gholap27-Jan-09 22:09 
QuestionCopy file from one folder to another Pin
PeterPan92919-Jan-09 18:09
PeterPan92919-Jan-09 18:09 
I want to copy one file from a given folder to another.
For this I have written the following standard code.

FileInputStream fileIn = null;
FileOutputStream fileOut= null;
File fileOut = new File(filePath + File.separator + outFileName);

try
{
fileIn = new FileInputStream(inFileName);
fileOut.createNewFile();
fileOut= new FileOutputStream(fileOut);

int cByte;
while ((cByte = fileIn .read()) != -1)
{
fOut.write(cByte);
}
}
catch (Exception e)
{ // Give IO Exception }
finally
{
try
{
if (fileIn != null) fileIn .close();
if (fileOut!= null) fileOut.close();
}
catch (Exception any){}
}

But this reading byte algorithm has a performance problem (for large files). Is there a better way to do this?
AnswerRe: Copy file from one folder to another Pin
PeterPan92921-Jan-09 21:47
PeterPan92921-Jan-09 21:47 
Questionnoob Needs help with File Handles and VM RAM Pin
TylerD7519-Jan-09 6:03
TylerD7519-Jan-09 6:03 
AnswerRe: noob Needs help with File Handles and VM RAM Pin
Reagan Conservative29-Jan-09 11:48
Reagan Conservative29-Jan-09 11:48 
AnswerBased on the code you provided... Pin
Naruki9-Feb-09 15:47
Naruki9-Feb-09 15:47 
QuestionAsking for helps about the GUI JAVA ... Pin
SantoKisVa19-Jan-09 3:12
SantoKisVa19-Jan-09 3:12 
AnswerRe: Asking for helps about the GUI JAVA ... Pin
Reagan Conservative20-Feb-09 6:38
Reagan Conservative20-Feb-09 6:38 
Questionprogram smart card to keep patient information Pin
fresh2g618-Jan-09 4:36
fresh2g618-Jan-09 4:36 
AnswerRe: program smart card to keep patient information Pin
Garth J Lancaster18-Jan-09 10:26
professionalGarth J Lancaster18-Jan-09 10:26 
QuestionFind numbers in a given string Pin
eng_maioia17-Jan-09 1:49
eng_maioia17-Jan-09 1:49 
AnswerRe: Find numbers in a given string Pin
toxcct19-Jan-09 1:41
toxcct19-Jan-09 1:41 
QuestionBest Method to Write ArrayLists Pin
Reagan Conservative15-Jan-09 8:34
Reagan Conservative15-Jan-09 8:34 
AnswerRe: Best Method to Write ArrayLists Pin
newbie_15-Jan-09 20:04
newbie_15-Jan-09 20:04 
GeneralRe: Best Method to Write ArrayLists Pin
Reagan Conservative16-Jan-09 3:55
Reagan Conservative16-Jan-09 3:55 
QuestionExtract metadata from WMV file using Java Pin
Java Developer - First Time15-Jan-09 6:32
Java Developer - First Time15-Jan-09 6:32 
GeneralRe: Extract metadata from WMV file using Java Pin
itsmani27-Jan-09 20:51
itsmani27-Jan-09 20:51 
AnswerThe very first step has nothing to do with Java. Pin
Naruki15-Feb-09 17:24
Naruki15-Feb-09 17:24 
Questionread coulm from file and store it to array Pin
newbie_15-Jan-09 3:05
newbie_15-Jan-09 3:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.