473,396 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

File Copy Problem....

539 512MB
Can you post the best URL/Tutorial site for high quality file copying of .COM file?

JoshAH?, BigDaddy?, roXxxxx?, how will you guys handle this? Please help...

I've surf the net, but all i can see are for .jpg or imaging files and text files copy...

This is my new problem as of now...

Im waiting for your replies... ;-(
Mar 22 '08 #1
6 1412
JosAH
11,448 Expert 8TB
Can you post the best URL/Tutorial site for high quality file copying of .COM file?

JoshAH?, BigDaddy?, roXxxxx?, how will you guys handle this? Please help...

I've surf the net, but all i can see are for .jpg or imaging files and text files copy...

This is my new problem as of now...

Im waiting for your replies... ;-(
What is so special about a .com file? I guess it isn't a text file so don't use a
Reader and Writer for the copying. Use simple InputStreams and OutputStreams
for the copy action, i.e. create the streams (File streams) and keep on reading
and writing until you've read all the bytes and written them. That scenario works
with all sorts of files.

kind regards,

Jos
Mar 22 '08 #2
sukatoa
539 512MB
What is so special about a .com file? I guess it isn't a text file so don't use a
Reader and Writer for the copying. Use simple InputStreams and OutputStreams
for the copy action, i.e. create the streams (File streams) and keep on reading
and writing until you've read all the bytes and written them. That scenario works
with all sorts of files.

kind regards,

Jos
.COM file? Im currently developing an A86 IDE... Just a simple editor...
I need to transfer that .COM file generated to the specified directory...

Previously i used that FileWriter and FileReader... The behavior of the copied .COm file is bad... I suspect it was from my implementation... I also posted it in one of my threads here in the forum...

Thanks Jos...
Mar 22 '08 #3
JosAH
11,448 Expert 8TB
.COM file? Im currently developing an A86 IDE... Just a simple editor...
I need to transfer that .COM file generated to the specified directory...

Previously i used that FileWriter and FileReader... The behavior of the copied .COm file is bad... I suspect it was from my implementation... I also posted it in one of my threads here in the forum...

Thanks Jos...
As I wrote: don't use Readers and Writers for non-text files; use Streams instead.
Those Readers and Writers try to encode/decode characters (two bytes); those
Streams just take those bytes as they are and don't do anything special to them.

kind regards,

Jos
Mar 22 '08 #4
sukatoa
539 512MB
As I wrote: don't use Readers and Writers for non-text files; use Streams instead.
Those Readers and Writers try to encode/decode characters (two bytes); those
Streams just take those bytes as they are and don't do anything special to them.

kind regards,

Jos
I've encounter FileChannel class @ API...
Using .transferFrom() method...

When we compare this with your reply Jos, what's the difference?
When the file are copied... Does it has any difference?

Jo's, i have implemented your suggestions, will this code could also capable for copying an MB size of file? or greater like GB size?

waiting for your reply
Mar 22 '08 #5
JosAH
11,448 Expert 8TB
I've encounter FileChannel class @ API...
Using .transferFrom() method...

When we compare this with your reply Jos, what's the difference?
When the file are copied... Does it has any difference?

Jo's, i have implemented your suggestions, will this code could also capable for copying an MB size of file? or greater like GB size?

waiting for your reply
The difference is that my solution just uses the java.io package and your solution
uses the java.nio package directly. The FileStreams use those channels under the
hood. Streams (as well as Channels) don't care about the size of the file.

kind regards,

Jos

ps. it may be a nice exercise to just use those channels; try it.
Mar 22 '08 #6
sukatoa
539 512MB
The difference is that my solution just uses the java.io package and your solution
uses the java.nio package directly. The FileStreams use those channels under the
hood. Streams (as well as Channels) don't care about the size of the file.

kind regards,

Jos

ps. it may be a nice exercise to just use those channels; try it.
Yah, you got it... your a GODLIKE....Jos..

thanks again...
Mar 22 '08 #7

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

Similar topics

1
by: Tony George | last post by:
Hi, I'm having a problem using the Copy module on a ClearCase view that's been set as "readonly" (i.e. ct chview -readonly <view tag>). I want to copy a file out of this view and put it in...
11
by: BoonHead, The Lost Philosopher | last post by:
I think the .NET framework is great! It's nice, clean and logical; in contradiction to the old Microsoft. It only saddens me that the new Microsoft still doesn't under stand there own...
2
by: Pete Davis | last post by:
I'm getting an exception when trying to copy a file. I basically do a File.Copy(source, dest, false); source is the source full path and filename. dest is the destination full path and...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
8
by: luis molina Micasoft | last post by:
it seems that when i do file.copy the svchost.exe is hanged, i mean if i make 40 threads of file.copy , 40 copys of files at same time the system is going down and stop responding, this is when i'm...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
17
by: Peter Duniho | last post by:
I searched using Google, on the web and in the newsgroups, and found nothing on this topic. Hopefully that means I just don't understand what I'm supposed to be doing here. :) The problem: ...
6
by: elake | last post by:
I found this thread about a pst file in Windows being locked and I am having the same issue. ...
3
by: tshad | last post by:
I have a function that downloads a file to the users computer and it works fine. The problem is that I then want the program to rename the file (file.move) to the same name plus todays date. ...
3
by: =?Utf-8?B?R2FuZXNoYQ==?= | last post by:
Hi I would like to use File.Copy with UNC paths. I have seen this problem reported by others as well. Can i use File.Copy with UNC paths. ie., i would like to copy a file from one of the folder to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.